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

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

Issue 546243002: Fix the uses of T* conversion operator from scoped_refptr<T> which is now removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review comments 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/common/chromecast_config.cc ('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 03b5d9ddf659a49a21e31c82aab33c658efdda16..d214db30e39173fbf7ab673f743ac8e204653836 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();
@@ -203,8 +204,8 @@ void URLRequestContextFactory::InitializeSystemContextDependencies() {
proxy_service_.reset(net::ProxyService::CreateUsingSystemProxyResolver(
net::ProxyService::CreateSystemProxyConfigService(
content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::IO).get(),
- content::BrowserThread::UnsafeGetMessageLoopForThread(
+ content::BrowserThread::IO),
+ content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::FILE)),
0,
NULL));
@@ -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();
« no previous file with comments | « chromecast/common/chromecast_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698