Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3009)

Unified Diff: chrome/browser/ui/webui/chrome_url_data_manager_backend.cc

Issue 10855209: Refactoring: ProtocolHandler::MaybeCreateJob takes NetworkDelegate as argument (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest merge Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome_frame/test/net/test_automation_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chrome_url_data_manager_backend.cc
diff --git a/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc b/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc
index b11da17076382e84af6b0119d59583d42d86c995..aa1a7e027bb26d22368d2268f1c3b2413eae44cc 100644
--- a/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc
+++ b/chrome/browser/ui/webui/chrome_url_data_manager_backend.cc
@@ -162,6 +162,7 @@ class URLRequestChromeJob : public net::URLRequestJob,
public base::SupportsWeakPtr<URLRequestChromeJob> {
public:
URLRequestChromeJob(net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
ChromeURLDataManagerBackend* backend);
// net::URLRequestJob implementation.
@@ -223,8 +224,9 @@ class URLRequestChromeJob : public net::URLRequestJob,
};
URLRequestChromeJob::URLRequestChromeJob(net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
ChromeURLDataManagerBackend* backend)
- : net::URLRequestJob(request, request->context()->network_delegate()),
+ : net::URLRequestJob(request, network_delegate),
data_offset_(0),
pending_buf_size_(0),
allow_caching_(true),
@@ -361,7 +363,8 @@ class ChromeProtocolHandler
~ChromeProtocolHandler();
virtual net::URLRequestJob* MaybeCreateJob(
- net::URLRequest* request) const OVERRIDE;
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const OVERRIDE;
private:
// These members are owned by ProfileIOData, which owns this ProtocolHandler.
@@ -377,11 +380,11 @@ ChromeProtocolHandler::ChromeProtocolHandler(
ChromeProtocolHandler::~ChromeProtocolHandler() {}
net::URLRequestJob* ChromeProtocolHandler::MaybeCreateJob(
- net::URLRequest* request) const {
+ net::URLRequest* request, net::NetworkDelegate* network_delegate) const {
DCHECK(request);
// Fall back to using a custom handler
- return new URLRequestChromeJob(request, backend_);
+ return new URLRequestChromeJob(request, network_delegate, backend_);
}
} // namespace
@@ -573,7 +576,8 @@ class DevToolsJobFactory
virtual ~DevToolsJobFactory();
virtual net::URLRequestJob* MaybeCreateJob(
- net::URLRequest* request) const OVERRIDE;
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const OVERRIDE;
private:
// |backend_| and |network_delegate_| are owned by ProfileIOData, which owns
@@ -594,14 +598,15 @@ DevToolsJobFactory::DevToolsJobFactory(ChromeURLDataManagerBackend* backend,
DevToolsJobFactory::~DevToolsJobFactory() {}
net::URLRequestJob*
-DevToolsJobFactory::MaybeCreateJob(net::URLRequest* request) const {
+DevToolsJobFactory::MaybeCreateJob(
+ net::URLRequest* request, net::NetworkDelegate* network_delegate) const {
if (ShouldLoadFromDisk()) {
FilePath path;
if (IsSupportedURL(request->url(), &path))
- return new net::URLRequestFileJob(request, path, network_delegate_);
+ return new net::URLRequestFileJob(request, network_delegate, path);
}
- return new URLRequestChromeJob(request, backend_);
+ return new URLRequestChromeJob(request, network_delegate, backend_);
}
} // namespace
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome_frame/test/net/test_automation_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698