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

Unified Diff: net/url_request/url_request_http_job.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_http_job.h ('k') | net/url_request/url_request_job_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index f763bcfae6d4c64339faa106aa4a71ba6b4fea68..9e320db230f644cd7c66df839b333c45fd1e98f3 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -197,23 +197,26 @@ void URLRequestHttpJob::HttpFilterContext::RecordPacketStats(
// TODO(darin): make sure the port blocking code is not lost
// static
URLRequestJob* URLRequestHttpJob::Factory(URLRequest* request,
+ NetworkDelegate* network_delegate,
const std::string& scheme) {
DCHECK(scheme == "http" || scheme == "https");
if (!request->context()->http_transaction_factory()) {
NOTREACHED() << "requires a valid context";
- return new URLRequestErrorJob(request, ERR_INVALID_ARGUMENT);
+ return new URLRequestErrorJob(
+ request, network_delegate, ERR_INVALID_ARGUMENT);
}
GURL redirect_url;
if (request->GetHSTSRedirect(&redirect_url))
- return new URLRequestRedirectJob(request, redirect_url);
- return new URLRequestHttpJob(request);
+ return new URLRequestRedirectJob(request, network_delegate, redirect_url);
+ return new URLRequestHttpJob(request, network_delegate);
}
-URLRequestHttpJob::URLRequestHttpJob(URLRequest* request)
- : URLRequestJob(request, request->context()->network_delegate()),
+URLRequestHttpJob::URLRequestHttpJob(URLRequest* request,
+ NetworkDelegate* network_delegate)
+ : URLRequestJob(request, network_delegate),
response_info_(NULL),
response_cookies_save_index_(0),
proxy_auth_state_(AUTH_STATE_DONT_NEED_AUTH),
« no previous file with comments | « net/url_request/url_request_http_job.h ('k') | net/url_request/url_request_job_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698