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

Unified Diff: android_webview/browser/aw_browser_context.cc

Issue 1356933002: make ProxyService::CreateSystemProxyConfigService return scoped_ptrs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: proper namespacing Created 5 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 | « no previous file | android_webview/browser/net/aw_url_request_context_getter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_browser_context.cc
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc
index 70f4ccbb40e06dd23e9b3926f43a886725f2d004..713b308bea9de7528683fc95a49be60d5f930329 100644
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -63,14 +63,18 @@ void DeleteDirRecursively(const base::FilePath& path) {
AwBrowserContext* g_browser_context = NULL;
-net::ProxyConfigService* CreateProxyConfigService() {
- net::ProxyConfigServiceAndroid* config_service =
- static_cast<net::ProxyConfigServiceAndroid*>(
- net::ProxyService::CreateSystemProxyConfigService(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
- nullptr /* Ignored on Android */ ));
- config_service->set_exclude_pac_url(true);
- return config_service;
+scoped_ptr<net::ProxyConfigService> CreateProxyConfigService() {
+ scoped_ptr<net::ProxyConfigService> config_service =
+ net::ProxyService::CreateSystemProxyConfigService(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+ nullptr /* Ignored on Android */);
+
+ // TODO(csharrison) Architect the wrapper better so we don't need a cast for
+ // android ProxyConfigServices.
+ net::ProxyConfigServiceAndroid* android_config_service =
+ static_cast<net::ProxyConfigServiceAndroid*>(config_service.get());
+ android_config_service->set_exclude_pac_url(true);
+ return config_service.Pass();
}
bool OverrideBlacklistForURL(const GURL& url, bool* block, int* reason) {
@@ -177,10 +181,8 @@ void AwBrowserContext::PreMainMessageLoopRun() {
LOG(WARNING) << "Failed to get cache directory for Android WebView. "
<< "Using app data directory as a fallback.";
}
- url_request_context_getter_ =
- new AwURLRequestContextGetter(
- cache_path, cookie_store_.get(),
- make_scoped_ptr(CreateProxyConfigService()).Pass());
+ url_request_context_getter_ = new AwURLRequestContextGetter(
+ cache_path, cookie_store_.get(), CreateProxyConfigService());
data_reduction_proxy_io_data_.reset(
new data_reduction_proxy::DataReductionProxyIOData(
« no previous file with comments | « no previous file | android_webview/browser/net/aw_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698