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

Unified Diff: chromecast/shell/browser/url_request_context_factory.cc

Issue 490603002: Chromecast: initial checkin of Android-based cast shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added android DEPS (git cl presubmit doesn't check Java DEPS?) Created 6 years, 3 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 | « chromecast/shell/browser/url_request_context_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/shell/browser/url_request_context_factory.cc
diff --git a/chromecast/shell/browser/url_request_context_factory.cc b/chromecast/shell/browser/url_request_context_factory.cc
index d214db30e39173fbf7ab673f743ac8e204653836..0bac1b3f52e1a9ba06ddaa6d9ac153ee58660587 100644
--- a/chromecast/shell/browser/url_request_context_factory.cc
+++ b/chromecast/shell/browser/url_request_context_factory.cc
@@ -63,8 +63,10 @@ class URLRequestContextFactory::URLRequestContextGetter
request_context_.reset(factory_->CreateMediaRequestContext());
} else {
request_context_.reset(factory_->CreateSystemRequestContext());
+#if defined(USE_NSS)
// Set request context used by NSS for Crl requests.
net::SetURLRequestContextForNSSHttpIO(request_context_.get());
+#endif // defined(USE_NSS)
}
}
return request_context_.get();
@@ -144,6 +146,14 @@ void URLRequestContextFactory::InitializeOnUIThread() {
// because it registers itself to pref notification observer which is not
// thread safe.
http_user_agent_settings_.reset(new CastHttpUserAgentSettings());
+
+ // Proxy config service should be initialized in UI thread, since
+ // ProxyConfigServiceDelegate on Android expects UI thread.
+ proxy_config_service_.reset(net::ProxyService::CreateSystemProxyConfigService(
+ content::BrowserThread::GetMessageLoopProxyForThread(
+ content::BrowserThread::IO),
+ content::BrowserThread::GetMessageLoopProxyForThread(
+ content::BrowserThread::FILE)));
}
net::URLRequestContextGetter* URLRequestContextFactory::CreateMainGetter(
@@ -202,13 +212,7 @@ void URLRequestContextFactory::InitializeSystemContextDependencies() {
http_server_properties_.reset(new net::HttpServerPropertiesImpl);
proxy_service_.reset(net::ProxyService::CreateUsingSystemProxyResolver(
- net::ProxyService::CreateSystemProxyConfigService(
- content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::IO),
- content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::FILE)),
- 0,
- NULL));
+ proxy_config_service_.release(), 0, NULL));
system_dependencies_initialized_ = true;
}
« no previous file with comments | « chromecast/shell/browser/url_request_context_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698