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

Unified Diff: chrome/browser/automation/url_request_automation_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
Index: chrome/browser/automation/url_request_automation_job.cc
diff --git a/chrome/browser/automation/url_request_automation_job.cc b/chrome/browser/automation/url_request_automation_job.cc
index 8b41e57c54151dc9dada0ffb5736f99c6e652651..f7cd433c194628715404e0293c0bfc0f23c1312a 100644
--- a/chrome/browser/automation/url_request_automation_job.cc
+++ b/chrome/browser/automation/url_request_automation_job.cc
@@ -52,11 +52,12 @@ net::URLRequest::ProtocolFactory* URLRequestAutomationJob::old_https_factory_
URLRequestAutomationJob::URLRequestAutomationJob(
net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
int tab,
int request_id,
AutomationResourceMessageFilter* filter,
bool is_pending)
- : net::URLRequestJob(request, request->context()->network_delegate()),
+ : net::URLRequestJob(request, network_delegate),
id_(0),
tab_(tab),
message_filter_(filter),
@@ -95,6 +96,7 @@ void URLRequestAutomationJob::EnsureProtocolFactoryRegistered() {
net::URLRequestJob* URLRequestAutomationJob::Factory(
net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
const std::string& scheme) {
bool scheme_is_http = request->url().SchemeIs("http");
bool scheme_is_https = request->url().SchemeIs("https");
@@ -108,7 +110,8 @@ net::URLRequestJob* URLRequestAutomationJob::Factory(
AutomationResourceMessageFilter::AutomationDetails details;
if (AutomationResourceMessageFilter::LookupRegisteredRenderView(
child_id, route_id, &details)) {
- URLRequestAutomationJob* job = new URLRequestAutomationJob(request,
+ URLRequestAutomationJob* job = new URLRequestAutomationJob(
+ request, network_delegate,
details.tab_handle, info->GetRequestID(), details.filter,
details.is_pending_render_view);
return job;
@@ -116,9 +119,9 @@ net::URLRequestJob* URLRequestAutomationJob::Factory(
}
if (scheme_is_http && old_http_factory_)
- return old_http_factory_(request, scheme);
+ return old_http_factory_(request, network_delegate, scheme);
else if (scheme_is_https && old_https_factory_)
- return old_https_factory_(request, scheme);
+ return old_https_factory_(request, network_delegate, scheme);
}
return NULL;
}
« no previous file with comments | « chrome/browser/automation/url_request_automation_job.h ('k') | chrome/browser/captive_portal/captive_portal_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698