Index: net/url_request/url_request_job_manager.cc |
diff --git a/net/url_request/url_request_job_manager.cc b/net/url_request/url_request_job_manager.cc |
index b3456288540f82021a39138e7740b32528291cc9..665a6fe2774f9e3ea5fe47967974b3da6bf3a11f 100644 |
--- a/net/url_request/url_request_job_manager.cc |
+++ b/net/url_request/url_request_job_manager.cc |
@@ -48,12 +48,12 @@ URLRequestJobManager* URLRequestJobManager::GetInstance() { |
} |
URLRequestJob* URLRequestJobManager::CreateJob( |
- URLRequest* request) const { |
+ URLRequest* request, NetworkDelegate* network_delegate) const { |
DCHECK(IsAllowedThread()); |
// If we are given an invalid URL, then don't even try to inspect the scheme. |
if (!request->url().is_valid()) |
- return new URLRequestErrorJob(request, ERR_INVALID_URL); |
+ return new URLRequestErrorJob(request, network_delegate, ERR_INVALID_URL); |
// We do this here to avoid asking interceptors about unsupported schemes. |
const URLRequestJobFactory* job_factory = NULL; |
@@ -62,10 +62,12 @@ URLRequestJob* URLRequestJobManager::CreateJob( |
const std::string& scheme = request->url().scheme(); // already lowercase |
if (job_factory) { |
if (!job_factory->IsHandledProtocol(scheme)) { |
- return new URLRequestErrorJob(request, ERR_UNKNOWN_URL_SCHEME); |
+ return new URLRequestErrorJob( |
+ request, network_delegate, ERR_UNKNOWN_URL_SCHEME); |
} |
} else if (!SupportsScheme(scheme)) { |
- return new URLRequestErrorJob(request, ERR_UNKNOWN_URL_SCHEME); |
+ return new URLRequestErrorJob( |
+ request, network_delegate, ERR_UNKNOWN_URL_SCHEME); |
} |
// THREAD-SAFETY NOTICE: |
@@ -92,8 +94,8 @@ URLRequestJob* URLRequestJobManager::CreateJob( |
} |
if (job_factory) { |
- URLRequestJob* job = |
- job_factory->MaybeCreateJobWithProtocolHandler(scheme, request); |
+ URLRequestJob* job = job_factory->MaybeCreateJobWithProtocolHandler( |
+ scheme, request, network_delegate); |
if (job) |
return job; |
} |
@@ -123,7 +125,7 @@ URLRequestJob* URLRequestJobManager::CreateJob( |
// wasn't interested in handling the URL. That is fairly unexpected, and we |
// don't have a specific error to report here :-( |
LOG(WARNING) << "Failed to map: " << request->url().spec(); |
- return new URLRequestErrorJob(request, ERR_FAILED); |
+ return new URLRequestErrorJob(request, network_delegate, ERR_FAILED); |
} |
URLRequestJob* URLRequestJobManager::MaybeInterceptRedirect( |