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

Side by Side Diff: chromecast/browser/url_request_context_factory.cc

Issue 1301333002: make ProxyService::CreateSystemProxyConfigService return scoped_ptrs NOT FOR REVIEW (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try merging again... 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/browser/url_request_context_factory.h" 5 #include "chromecast/browser/url_request_context_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/threading/worker_pool.h" 10 #include "base/threading/worker_pool.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 void URLRequestContextFactory::InitializeOnUIThread(net::NetLog* net_log) { 146 void URLRequestContextFactory::InitializeOnUIThread(net::NetLog* net_log) {
147 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 147 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
148 // Cast http user agent settings must be initialized in UI thread 148 // Cast http user agent settings must be initialized in UI thread
149 // because it registers itself to pref notification observer which is not 149 // because it registers itself to pref notification observer which is not
150 // thread safe. 150 // thread safe.
151 http_user_agent_settings_.reset(new CastHttpUserAgentSettings()); 151 http_user_agent_settings_.reset(new CastHttpUserAgentSettings());
152 152
153 // Proxy config service should be initialized in UI thread, since 153 // Proxy config service should be initialized in UI thread, since
154 // ProxyConfigServiceDelegate on Android expects UI thread. 154 // ProxyConfigServiceDelegate on Android expects UI thread.
155 proxy_config_service_.reset(net::ProxyService::CreateSystemProxyConfigService( 155 proxy_config_service_ = net::ProxyService::CreateSystemProxyConfigService(
156 content::BrowserThread::GetMessageLoopProxyForThread( 156 content::BrowserThread::GetMessageLoopProxyForThread(
157 content::BrowserThread::IO), 157 content::BrowserThread::IO),
158 content::BrowserThread::GetMessageLoopProxyForThread( 158 content::BrowserThread::GetMessageLoopProxyForThread(
159 content::BrowserThread::FILE))); 159 content::BrowserThread::FILE));
160 160
161 net_log_ = net_log; 161 net_log_ = net_log;
162 } 162 }
163 163
164 net::URLRequestContextGetter* URLRequestContextFactory::CreateMainGetter( 164 net::URLRequestContextGetter* URLRequestContextFactory::CreateMainGetter(
165 content::BrowserContext* browser_context, 165 content::BrowserContext* browser_context,
166 content::ProtocolHandlerMap* protocol_handlers, 166 content::ProtocolHandlerMap* protocol_handlers,
167 content::URLRequestInterceptorScopedVector request_interceptors) { 167 content::URLRequestInterceptorScopedVector request_interceptors) {
168 DCHECK(!main_getter_.get()) 168 DCHECK(!main_getter_.get())
169 << "Main URLRequestContextGetter already initialized"; 169 << "Main URLRequestContextGetter already initialized";
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 void URLRequestContextFactory::InitializeNetworkDelegates() { 409 void URLRequestContextFactory::InitializeNetworkDelegates() {
410 app_network_delegate_->Initialize(false); 410 app_network_delegate_->Initialize(false);
411 LOG(INFO) << "Initialized app network delegate."; 411 LOG(INFO) << "Initialized app network delegate.";
412 system_network_delegate_->Initialize(false); 412 system_network_delegate_->Initialize(false);
413 LOG(INFO) << "Initialized system network delegate."; 413 LOG(INFO) << "Initialized system network delegate.";
414 } 414 }
415 415
416 } // namespace shell 416 } // namespace shell
417 } // namespace chromecast 417 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698