diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-13 23:16:41 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-13 23:16:41 +0000 |
commit | a785dab62712680006d9152b584a280ef0b97fcd (patch) | |
tree | efd5d85ade098e06081cd7b2851ccd8cb414ac69 /net/base/network_delegate.h | |
parent | f6fd8fad1d94293c156b144edd6c5e13bd200b3c (diff) | |
download | chromium_src-a785dab62712680006d9152b584a280ef0b97fcd.zip chromium_src-a785dab62712680006d9152b584a280ef0b97fcd.tar.gz chromium_src-a785dab62712680006d9152b584a280ef0b97fcd.tar.bz2 |
Revert "Allow extensions to redirect requests in onBeforeRequest."
The change introduced a regression in the WebRequestEvents api test.
TBR=mpcomplete
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81503 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/network_delegate.h')
-rw-r--r-- | net/base/network_delegate.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h index eafb212..effc699 100644 --- a/net/base/network_delegate.h +++ b/net/base/network_delegate.h @@ -9,8 +9,6 @@ #include "base/threading/non_thread_safe.h" #include "net/base/completion_callback.h" -class GURL; - namespace net { // NOTE: Layering violations! @@ -36,11 +34,10 @@ class NetworkDelegate : public base::NonThreadSafe { // checking on parameters. See the corresponding virtuals for explanations of // the methods and their arguments. int NotifyBeforeURLRequest(URLRequest* request, - CompletionCallback* callback, - GURL* new_url); + CompletionCallback* callback); int NotifyBeforeSendHeaders(uint64 request_id, - CompletionCallback* callback, - HttpRequestHeaders* headers); + HttpRequestHeaders* headers, + CompletionCallback* callback); void NotifyResponseStarted(URLRequest* request); void NotifyReadCompleted(URLRequest* request, int bytes_read); void NotifyURLRequestDestroyed(URLRequest* request); @@ -58,22 +55,20 @@ class NetworkDelegate : public base::NonThreadSafe { // member functions will be called by the respective public notification // member function, which will perform basic sanity checking. - // Called before a request is sent. Allows the delegate to rewrite the URL - // being fetched by modifying |new_url|. The callback can be called at any - // time, but will have no effect if the request has already been cancelled or + // Called before a request is sent. The callback can be called at any time, + // but will have no effect if the request has already been cancelled or // deleted. Returns a net status code, generally either OK to continue with // the request or ERR_IO_PENDING if the result is not ready yet. virtual int OnBeforeURLRequest(URLRequest* request, - CompletionCallback* callback, - GURL* new_url) = 0; + CompletionCallback* callback) = 0; // Called right before the HTTP headers are sent. Allows the delegate to // read/write |headers| before they get sent out. The callback can be called // at any time, but will have no effect if the transaction handling this // request has been cancelled. Returns a net status code. virtual int OnBeforeSendHeaders(uint64 request_id, - CompletionCallback* callback, - HttpRequestHeaders* headers) = 0; + HttpRequestHeaders* headers, + CompletionCallback* callback) = 0; // This corresponds to URLRequestDelegate::OnResponseStarted. virtual void OnResponseStarted(URLRequest* request) = 0; |