Index: content/shell/browser/shell_browser_context.cc |
diff --git a/content/shell/browser/shell_browser_context.cc b/content/shell/browser/shell_browser_context.cc |
index 9b0003bb5af73a4d8388024ca6f92a68c2500f90..6d0d60470e80405279de3338fbaa2b11a45090f4 100644 |
--- a/content/shell/browser/shell_browser_context.cc |
+++ b/content/shell/browser/shell_browser_context.cc |
@@ -133,11 +133,11 @@ net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { |
return GetDefaultStoragePartition(this)->GetURLRequestContext(); |
} |
-net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( |
+content::ShellURLRequestContextGetter* |
+ShellBrowserContext::CreateURLRequestContextGetter( |
ProtocolHandlerMap* protocol_handlers, |
URLRequestInterceptorScopedVector request_interceptors) { |
- DCHECK(!url_request_getter_.get()); |
- url_request_getter_ = new ShellURLRequestContextGetter( |
+ return new ShellURLRequestContextGetter( |
ignore_certificate_errors_, |
GetPath(), |
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), |
@@ -145,10 +145,30 @@ net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( |
protocol_handlers, |
request_interceptors.Pass(), |
net_log_); |
+} |
+ |
+net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( |
+ ProtocolHandlerMap* protocol_handlers, |
+ URLRequestInterceptorScopedVector request_interceptors) { |
+ DCHECK(!url_request_getter_.get()); |
+ url_request_getter_ = CreateURLRequestContextGetter( |
+ protocol_handlers, request_interceptors.Pass()); |
resource_context_->set_url_request_context_getter(url_request_getter_.get()); |
return url_request_getter_.get(); |
} |
+net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( |
+ ProtocolHandlerMap* protocol_handlers, |
+ URLRequestInterceptorScopedVector request_interceptors, |
+ net::NetworkDelegate* network_delegate) { |
+ ShellURLRequestContextGetter* shell_request_context_getter = |
+ reinterpret_cast<ShellURLRequestContextGetter*>(CreateRequestContext( |
+ protocol_handlers, request_interceptors.Pass())); |
+ shell_request_context_getter->set_network_delegate(network_delegate); |
+ url_request_getter_ = shell_request_context_getter; |
+ return url_request_getter_.get(); |
+} |
+ |
net::URLRequestContextGetter* |
ShellBrowserContext::GetRequestContextForRenderProcess( |
int renderer_child_id) { |