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

Unified Diff: net/url_request/url_request_filter.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 | « net/url_request/url_request_filter.h ('k') | net/url_request/url_request_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_filter.cc
diff --git a/net/url_request/url_request_filter.cc b/net/url_request/url_request_filter.cc
index 913c0fd1c73668fc32384b9272d6373c00aaecb8..01b6069107282999088a9e32ce6d4cfae62557f1 100644
--- a/net/url_request/url_request_filter.cc
+++ b/net/url_request/url_request_filter.cc
@@ -16,9 +16,10 @@ URLRequestFilter::~URLRequestFilter() {}
// static
URLRequestJob* URLRequestFilter::Factory(URLRequest* request,
+ NetworkDelegate* network_delegate,
const std::string& scheme) {
// Returning null here just means that the built-in handler will be used.
- return GetInstance()->FindRequestHandler(request, scheme);
+ return GetInstance()->FindRequestHandler(request, network_delegate, scheme);
}
// static
@@ -119,6 +120,7 @@ URLRequestFilter::URLRequestFilter() : hit_count_(0) { }
URLRequestJob* URLRequestFilter::FindRequestHandler(
URLRequest* request,
+ NetworkDelegate* network_delegate,
const std::string& scheme) {
URLRequestJob* job = NULL;
if (request->url().is_valid()) {
@@ -128,14 +130,14 @@ URLRequestJob* URLRequestFilter::FindRequestHandler(
HostnameHandlerMap::iterator i =
hostname_handler_map_.find(make_pair(scheme, hostname));
if (i != hostname_handler_map_.end())
- job = i->second(request, scheme);
+ job = i->second(request, network_delegate, scheme);
if (!job) {
// Not in the hostname map, check the url map.
const std::string& url = request->url().spec();
UrlHandlerMap::iterator i = url_handler_map_.find(url);
if (i != url_handler_map_.end())
- job = i->second(request, scheme);
+ job = i->second(request, network_delegate, scheme);
}
}
if (job) {
« no previous file with comments | « net/url_request/url_request_filter.h ('k') | net/url_request/url_request_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698