Commit b2aa2ab0 authored by lcwu's avatar lcwu Committed by Commit bot

Fix the uses of T* conversion operator from scoped_refptr<T> which is now removed.

Please see https://codereview.chromium.org/510323002 for reference.

BUG=None

Review URL: https://codereview.chromium.org/546243002

Cr-Commit-Position: refs/heads/master@{#293778}
parent 30301062
...@@ -81,8 +81,9 @@ bool ChromecastConfig::Load(PrefRegistrySimple* registry) { ...@@ -81,8 +81,9 @@ bool ChromecastConfig::Load(PrefRegistrySimple* registry) {
PersistentPrefStore::PrefReadError prefs_read_error = PersistentPrefStore::PrefReadError prefs_read_error =
PersistentPrefStore::PREF_READ_ERROR_NONE; PersistentPrefStore::PREF_READ_ERROR_NONE;
base::PrefServiceFactory prefServiceFactory; base::PrefServiceFactory prefServiceFactory;
prefServiceFactory.SetUserPrefsFile(config_path_, scoped_refptr<base::SequencedTaskRunner> task_runner =
JsonPrefStore::GetTaskRunnerForFile(config_path_, worker_pool_)); JsonPrefStore::GetTaskRunnerForFile(config_path_, worker_pool_.get());
prefServiceFactory.SetUserPrefsFile(config_path_, task_runner.get());
prefServiceFactory.set_async(false); prefServiceFactory.set_async(false);
prefServiceFactory.set_read_error_callback( prefServiceFactory.set_read_error_callback(
base::Bind(&UserPrefsLoadError, &prefs_read_error)); base::Bind(&UserPrefsLoadError, &prefs_read_error));
......
...@@ -150,7 +150,8 @@ net::URLRequestContextGetter* URLRequestContextFactory::CreateMainGetter( ...@@ -150,7 +150,8 @@ net::URLRequestContextGetter* URLRequestContextFactory::CreateMainGetter(
content::BrowserContext* browser_context, content::BrowserContext* browser_context,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) { content::URLRequestInterceptorScopedVector request_interceptors) {
DCHECK(!main_getter_) << "Main URLRequestContextGetter already initialized"; DCHECK(!main_getter_.get())
<< "Main URLRequestContextGetter already initialized";
main_getter_ = new MainURLRequestContextGetter(this, main_getter_ = new MainURLRequestContextGetter(this,
browser_context, browser_context,
protocol_handlers, protocol_handlers,
...@@ -159,19 +160,19 @@ net::URLRequestContextGetter* URLRequestContextFactory::CreateMainGetter( ...@@ -159,19 +160,19 @@ net::URLRequestContextGetter* URLRequestContextFactory::CreateMainGetter(
} }
net::URLRequestContextGetter* URLRequestContextFactory::GetMainGetter() { net::URLRequestContextGetter* URLRequestContextFactory::GetMainGetter() {
CHECK(main_getter_); CHECK(main_getter_.get());
return main_getter_.get(); return main_getter_.get();
} }
net::URLRequestContextGetter* URLRequestContextFactory::GetSystemGetter() { net::URLRequestContextGetter* URLRequestContextFactory::GetSystemGetter() {
if (!system_getter_) { if (!system_getter_.get()) {
system_getter_ = new URLRequestContextGetter(this, false); system_getter_ = new URLRequestContextGetter(this, false);
} }
return system_getter_.get(); return system_getter_.get();
} }
net::URLRequestContextGetter* URLRequestContextFactory::GetMediaGetter() { net::URLRequestContextGetter* URLRequestContextFactory::GetMediaGetter() {
if (!media_getter_) { if (!media_getter_.get()) {
media_getter_ = new URLRequestContextGetter(this, true); media_getter_ = new URLRequestContextGetter(this, true);
} }
return media_getter_.get(); return media_getter_.get();
...@@ -203,8 +204,8 @@ void URLRequestContextFactory::InitializeSystemContextDependencies() { ...@@ -203,8 +204,8 @@ void URLRequestContextFactory::InitializeSystemContextDependencies() {
proxy_service_.reset(net::ProxyService::CreateUsingSystemProxyResolver( proxy_service_.reset(net::ProxyService::CreateUsingSystemProxyResolver(
net::ProxyService::CreateSystemProxyConfigService( net::ProxyService::CreateSystemProxyConfigService(
content::BrowserThread::GetMessageLoopProxyForThread( content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::IO).get(), content::BrowserThread::IO),
content::BrowserThread::UnsafeGetMessageLoopForThread( content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::FILE)), content::BrowserThread::FILE)),
0, 0,
NULL)); NULL));
...@@ -312,7 +313,7 @@ net::URLRequestContext* URLRequestContextFactory::CreateSystemRequestContext() { ...@@ -312,7 +313,7 @@ net::URLRequestContext* URLRequestContextFactory::CreateSystemRequestContext() {
net::URLRequestContext* URLRequestContextFactory::CreateMediaRequestContext() { net::URLRequestContext* URLRequestContextFactory::CreateMediaRequestContext() {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
DCHECK(main_getter_) DCHECK(main_getter_.get())
<< "Getting MediaRequestContext before MainRequestContext"; << "Getting MediaRequestContext before MainRequestContext";
net::URLRequestContext* main_context = main_getter_->GetURLRequestContext(); net::URLRequestContext* main_context = main_getter_->GetURLRequestContext();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment