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

Unified Diff: chrome/browser/custom_handlers/protocol_handler_registry.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
Index: chrome/browser/custom_handlers/protocol_handler_registry.cc
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chrome/browser/custom_handlers/protocol_handler_registry.cc
index 518be118a64368a2450724a45b93c3bbbab0164a..12ca2f27435b2e55d73068a264c75ece78b05b66 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.cc
@@ -90,7 +90,8 @@ class ProtocolHandlerRegistry::Core
// Creates a URL request job for the given request if there is a matching
// protocol handler, returns NULL otherwise.
- net::URLRequestJob* MaybeCreateJob(net::URLRequest* request) const;
+ net::URLRequestJob* MaybeCreateJob(
+ net::URLRequest* request, net::NetworkDelegate* network_delegate) const;
// Indicate that the registry has been enabled in the IO thread's
// copy of the data.
@@ -137,7 +138,7 @@ void ProtocolHandlerRegistry::Core::SetDefault(const ProtocolHandler& handler) {
// is registered and the associated handler is able to interpret
// the url from |request|.
net::URLRequestJob* ProtocolHandlerRegistry::Core::MaybeCreateJob(
- net::URLRequest* request) const {
+ net::URLRequest* request, net::NetworkDelegate* network_delegate) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
ProtocolHandler handler = LookupHandler(default_handlers_,
@@ -149,7 +150,8 @@ net::URLRequestJob* ProtocolHandlerRegistry::Core::MaybeCreateJob(
if (!translated_url.is_valid())
return NULL;
- return new net::URLRequestRedirectJob(request, translated_url);
+ return new net::URLRequestRedirectJob(
+ request, network_delegate, translated_url);
}
// URLInterceptor ------------------------------------------------------------
@@ -165,17 +167,21 @@ class ProtocolHandlerRegistry::URLInterceptor
virtual ~URLInterceptor();
virtual net::URLRequestJob* MaybeIntercept(
- net::URLRequest* request) const OVERRIDE;
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const OVERRIDE;
virtual bool WillHandleProtocol(const std::string& protocol) const OVERRIDE;
virtual net::URLRequestJob* MaybeInterceptRedirect(
- const GURL& url, net::URLRequest* request) const OVERRIDE {
+ const GURL& url,
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const OVERRIDE {
return NULL;
}
virtual net::URLRequestJob* MaybeInterceptResponse(
- net::URLRequest* request) const OVERRIDE {
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const OVERRIDE {
return NULL;
}
@@ -193,10 +199,10 @@ ProtocolHandlerRegistry::URLInterceptor::~URLInterceptor() {
}
net::URLRequestJob* ProtocolHandlerRegistry::URLInterceptor::MaybeIntercept(
- net::URLRequest* request) const {
+ net::URLRequest* request, net::NetworkDelegate* network_delegate) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- return core_->MaybeCreateJob(request);
+ return core_->MaybeCreateJob(request, network_delegate);
}
bool ProtocolHandlerRegistry::URLInterceptor::WillHandleProtocol(

Powered by Google App Engine
This is Rietveld 408576698