diff options
author | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-14 19:26:10 +0000 |
---|---|---|
committer | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-14 19:26:10 +0000 |
commit | 5796dc94436c7d92b0b913aeb091ff6ea98ee575 (patch) | |
tree | 139f193789e8b2f412eaa4574b0af916fb7e896d /net/url_request/url_request.cc | |
parent | f667e2ee48c8347341b5dc18a409ee7f564cb266 (diff) | |
download | chromium_src-5796dc94436c7d92b0b913aeb091ff6ea98ee575.zip chromium_src-5796dc94436c7d92b0b913aeb091ff6ea98ee575.tar.gz chromium_src-5796dc94436c7d92b0b913aeb091ff6ea98ee575.tar.bz2 |
Replace onRequestSent with onSendHeaders in webrequest API
This CL replaces the onRequestSent signal of the webrequest API with a new onSendHeader signal. The sequence is now: onBeforeRequest -> onBeforeSendHeaders -> onSendHeaders.
This change allows us to completely remove the webrequest API from the network transaction layer and stay in the URL request layer. That solve the problem that the network layer may convert one URLRequest to multiple HTTP requests which should be transparent to the webrequest API. It also solves the problem that requests answered from the cache did not trigger an onRequestSent event.
Given the choice of removing onRequestSent completely and replacing it with onSendHeaders, I chose the latter so that extensions can see the headers sent to the network after other extensions had a chance to modify them.
BUG=no
TEST=no
Review URL: http://codereview.chromium.org/7353021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92584 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request.cc')
-rw-r--r-- | net/url_request/url_request.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc index f058c2f..6187463 100644 --- a/net/url_request/url_request.cc +++ b/net/url_request/url_request.cc @@ -46,6 +46,7 @@ void StripPostSpecificHeaders(HttpRequestHeaders* headers) { headers->RemoveHeader(HttpRequestHeaders::kOrigin); } +// TODO(battre): Delete this, see http://crbug.com/89321: // This counter keeps track of the identifiers used for URL requests so far. // 0 is reserved to represent an invalid ID. uint64 g_next_url_request_identifier = 1; @@ -730,7 +731,7 @@ void URLRequest::NotifyAuthRequired(AuthChallengeInfo* auth_info) { //} // This fixes URLRequestTestHTTP.BasicAuth but not // URLRequestTestHTTP.BasicAuthWithCookies. In both cases we observe a - // call sequence of OnBeforeSendHeaders -> OnRequestSent -> + // call sequence of OnBeforeSendHeaders -> OnSendHeaders -> // OnBeforeSendHeaders. if (delegate_) |