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

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: NetworkDelegate fixed almost everywhere 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: 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 80bcbc2bdc2cee8ee8fb58585606c1a250b15e46..35c962e433a5e1d3cd99f6054d0910d287f7e8a8 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -169,23 +169,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),

Powered by Google App Engine
This is Rietveld 408576698