diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-24 00:22:50 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-24 00:22:50 +0000 |
commit | 0651b818c7122d319954ff5bc30dff68ba8b9013 (patch) | |
tree | d18a681545594c17175a584b7d56a6ee9abd10b6 /net/url_request/url_request.cc | |
parent | 26616172ccaeae9842d7e52b556bc49e16751455 (diff) | |
download | chromium_src-0651b818c7122d319954ff5bc30dff68ba8b9013.zip chromium_src-0651b818c7122d319954ff5bc30dff68ba8b9013.tar.gz chromium_src-0651b818c7122d319954ff5bc30dff68ba8b9013.tar.bz2 |
Refactor of NetworkDelegate.
* Renames HttpNetworkDelegate to NetworkDelegate, moves to net/base/network_delegate.h. NOTE: this is a layering violation. wtc/eroman/willchan have agreed to this exception because the other solutions are less palatable.
* Move the virtuals in NetworkDelegate to the private section. Use non-virtual public interface as the network stack's interface for notifying the delegate. Add sanity checking to the implmentation in NetworkDelegate. The private virtual interface is for consumers to receive notifications.
* Remove ExtensionIOEventRouter from ChromeURLRequestContext, it is only used by the ChromeNetworkDelegate. Pass it directly to the ChromeNetworkDelegate's constructor.
* Introduce a SystemNetworkDelegate. It does nothing right now.
BUG=67232
TEST=none
Review URL: http://codereview.chromium.org/6580002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75822 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request.cc')
-rw-r--r-- | net/url_request/url_request.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc index ca8aacb..e25bac6 100644 --- a/net/url_request/url_request.cc +++ b/net/url_request/url_request.cc @@ -13,9 +13,9 @@ #include "net/base/load_flags.h" #include "net/base/net_errors.h" #include "net/base/net_log.h" +#include "net/base/network_delegate.h" #include "net/base/ssl_cert_request_info.h" #include "net/base/upload_data.h" -#include "net/http/http_network_delegate.h" #include "net/http/http_response_headers.h" #include "net/http/http_util.h" #include "net/url_request/url_request_context.h" @@ -370,7 +370,7 @@ void URLRequest::StartJob(URLRequestJob* job) { // TODO(mpcomplete): pass in request ID? // TODO(mpcomplete): allow delegate to potentially delay/cancel request. if (context_ && context_->network_delegate()) - context_->network_delegate()->OnBeforeURLRequest(this); + context_->network_delegate()->NotifyBeforeURLRequest(this); net_log_.BeginEvent( net::NetLog::TYPE_URL_REQUEST_START_JOB, @@ -494,7 +494,7 @@ void URLRequest::ResponseStarted() { RestartWithJob(job); } else { if (context_ && context_->network_delegate()) - context_->network_delegate()->OnResponseStarted(this); + context_->network_delegate()->NotifyResponseStarted(this); if (delegate_) delegate_->OnResponseStarted(this); } |