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

Unified Diff: net/url_request/url_request_job_factory.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_job_factory.h ('k') | net/url_request/url_request_job_factory_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_job_factory.cc
diff --git a/net/url_request/url_request_job_factory.cc b/net/url_request/url_request_job_factory.cc
index 44bc0024170c3ae68135b5e73ee65839b29fee28..4961c03b19a33faf77bb847c0403a06a30f5ad17 100644
--- a/net/url_request/url_request_job_factory.cc
+++ b/net/url_request/url_request_job_factory.cc
@@ -56,14 +56,14 @@ void URLRequestJobFactory::AddInterceptor(Interceptor* interceptor) {
}
URLRequestJob* URLRequestJobFactory::MaybeCreateJobWithInterceptor(
- URLRequest* request) const {
+ URLRequest* request, NetworkDelegate* network_delegate) const {
DCHECK(CalledOnValidThread());
URLRequestJob* job = NULL;
if (!(request->load_flags() & LOAD_DISABLE_INTERCEPT)) {
InterceptorList::const_iterator i;
for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
- job = (*i)->MaybeIntercept(request);
+ job = (*i)->MaybeIntercept(request, network_delegate);
if (job)
return job;
}
@@ -73,24 +73,26 @@ URLRequestJob* URLRequestJobFactory::MaybeCreateJobWithInterceptor(
URLRequestJob* URLRequestJobFactory::MaybeCreateJobWithProtocolHandler(
const std::string& scheme,
- URLRequest* request) const {
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const {
DCHECK(CalledOnValidThread());
ProtocolHandlerMap::const_iterator it = protocol_handler_map_.find(scheme);
if (it == protocol_handler_map_.end())
return NULL;
- return it->second->MaybeCreateJob(request);
+ return it->second->MaybeCreateJob(request, network_delegate);
}
URLRequestJob* URLRequestJobFactory::MaybeInterceptRedirect(
const GURL& location,
- URLRequest* request) const {
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const {
DCHECK(CalledOnValidThread());
URLRequestJob* job = NULL;
if (!(request->load_flags() & LOAD_DISABLE_INTERCEPT)) {
InterceptorList::const_iterator i;
for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
- job = (*i)->MaybeInterceptRedirect(location, request);
+ job = (*i)->MaybeInterceptRedirect(location, request, network_delegate);
if (job)
return job;
}
@@ -99,14 +101,14 @@ URLRequestJob* URLRequestJobFactory::MaybeInterceptRedirect(
}
URLRequestJob* URLRequestJobFactory::MaybeInterceptResponse(
- URLRequest* request) const {
+ URLRequest* request, NetworkDelegate* network_delegate) const {
DCHECK(CalledOnValidThread());
URLRequestJob* job = NULL;
if (!(request->load_flags() & LOAD_DISABLE_INTERCEPT)) {
InterceptorList::const_iterator i;
for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
- job = (*i)->MaybeInterceptResponse(request);
+ job = (*i)->MaybeInterceptResponse(request, network_delegate);
if (job)
return job;
}
« no previous file with comments | « net/url_request/url_request_job_factory.h ('k') | net/url_request/url_request_job_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698