mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Implement improvements for request handling (issue #1327).
- Add a new CefRequestHandler::OnResourceResponse() method for inspecting the request/response headers and potentially restarting or redirecting the request. - Add a new CefRequest::GetIdentifier() method for tracking a request across multiple CefRequestHandler callbacks. - Pass a CefRequest object instead of just the old URL to CefRequestHandler::OnResourceRedirect(). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2073 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -104,6 +104,7 @@ CefRequestImpl::CefRequestImpl()
|
||||
: method_("GET"),
|
||||
resource_type_(RT_SUB_RESOURCE),
|
||||
transition_type_(TT_EXPLICIT),
|
||||
identifier_(0U),
|
||||
flags_(UR_FLAG_NONE),
|
||||
read_only_(false) {
|
||||
}
|
||||
@@ -199,6 +200,11 @@ CefRequestImpl::TransitionType CefRequestImpl::GetTransitionType() {
|
||||
return transition_type_;
|
||||
}
|
||||
|
||||
uint64 CefRequestImpl::GetIdentifier() {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
return identifier_;
|
||||
}
|
||||
|
||||
void CefRequestImpl::Set(net::URLRequest* request) {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
CHECK_READONLY_RETURN_VOID();
|
||||
@@ -206,6 +212,7 @@ void CefRequestImpl::Set(net::URLRequest* request) {
|
||||
url_ = request->url().spec();
|
||||
method_ = request->method();
|
||||
first_party_for_cookies_ = request->first_party_for_cookies().spec();
|
||||
identifier_ = request->identifier();
|
||||
|
||||
net::HttpRequestHeaders headers = request->extra_request_headers();
|
||||
|
||||
|
Reference in New Issue
Block a user