Chromium Code Reviews| 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 03b5d9ddf659a49a21e31c82aab33c658efdda16..c0f535c8842464020e17001a1824deb27d0a5b4c 100644 |
| --- a/chromecast/shell/browser/url_request_context_factory.cc |
| +++ b/chromecast/shell/browser/url_request_context_factory.cc |
| @@ -150,7 +150,8 @@ net::URLRequestContextGetter* URLRequestContextFactory::CreateMainGetter( |
| content::BrowserContext* browser_context, |
| content::ProtocolHandlerMap* protocol_handlers, |
| content::URLRequestInterceptorScopedVector request_interceptors) { |
| - DCHECK(!main_getter_) << "Main URLRequestContextGetter already initialized"; |
| + DCHECK(!main_getter_.get()) |
| + << "Main URLRequestContextGetter already initialized"; |
| main_getter_ = new MainURLRequestContextGetter(this, |
| browser_context, |
| protocol_handlers, |
| @@ -159,19 +160,19 @@ net::URLRequestContextGetter* URLRequestContextFactory::CreateMainGetter( |
| } |
| net::URLRequestContextGetter* URLRequestContextFactory::GetMainGetter() { |
| - CHECK(main_getter_); |
| + CHECK(main_getter_.get()); |
| return main_getter_.get(); |
| } |
| net::URLRequestContextGetter* URLRequestContextFactory::GetSystemGetter() { |
| - if (!system_getter_) { |
| + if (!system_getter_.get()) { |
| system_getter_ = new URLRequestContextGetter(this, false); |
| } |
| return system_getter_.get(); |
| } |
| net::URLRequestContextGetter* URLRequestContextFactory::GetMediaGetter() { |
| - if (!media_getter_) { |
| + if (!media_getter_.get()) { |
| media_getter_ = new URLRequestContextGetter(this, true); |
| } |
| return media_getter_.get(); |
| @@ -204,8 +205,8 @@ void URLRequestContextFactory::InitializeSystemContextDependencies() { |
| net::ProxyService::CreateSystemProxyConfigService( |
| content::BrowserThread::GetMessageLoopProxyForThread( |
| content::BrowserThread::IO).get(), |
| - content::BrowserThread::UnsafeGetMessageLoopForThread( |
| - content::BrowserThread::FILE)), |
| + content::BrowserThread::GetMessageLoopProxyForThread( |
| + content::BrowserThread::FILE).get()), |
|
damienv1
2014/09/08 16:27:21
Why do you need raw pointers here ?
See prototype:
lcwu1
2014/09/08 18:01:58
This is indeed a bug. Thanks for catching this. Do
|
| 0, |
| NULL)); |
| system_dependencies_initialized_ = true; |
| @@ -312,7 +313,7 @@ net::URLRequestContext* URLRequestContextFactory::CreateSystemRequestContext() { |
| net::URLRequestContext* URLRequestContextFactory::CreateMediaRequestContext() { |
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
| - DCHECK(main_getter_) |
| + DCHECK(main_getter_.get()) |
| << "Getting MediaRequestContext before MainRequestContext"; |
| net::URLRequestContext* main_context = main_getter_->GetURLRequestContext(); |