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

Unified Diff: chromecast/common/chromecast_config.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: 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
Index: chromecast/common/chromecast_config.cc
diff --git a/chromecast/common/chromecast_config.cc b/chromecast/common/chromecast_config.cc
index 0e4261d55dbc489321533d05b2f7b2c9d2ca5056..e2ca9502e0c04e0a83e2c000638b1f23ada0d3a0 100644
--- a/chromecast/common/chromecast_config.cc
+++ b/chromecast/common/chromecast_config.cc
@@ -81,8 +81,9 @@ bool ChromecastConfig::Load(PrefRegistrySimple* registry) {
PersistentPrefStore::PrefReadError prefs_read_error =
PersistentPrefStore::PREF_READ_ERROR_NONE;
base::PrefServiceFactory prefServiceFactory;
- prefServiceFactory.SetUserPrefsFile(config_path_,
- JsonPrefStore::GetTaskRunnerForFile(config_path_, worker_pool_));
+ scoped_refptr<base::SequencedTaskRunner> task_runner =
+ JsonPrefStore::GetTaskRunnerForFile(config_path_, worker_pool_.get());
+ prefServiceFactory.SetUserPrefsFile(config_path_, task_runner.get());
damienv1 2014/09/08 16:27:21 Is it safe ? Ref count for task runner will be dec
lcwu1 2014/09/08 18:01:58 Yes, it is. task_runner's raw pointer gets passed
prefServiceFactory.set_async(false);
prefServiceFactory.set_read_error_callback(
base::Bind(&UserPrefsLoadError, &prefs_read_error));

Powered by Google App Engine
This is Rietveld 408576698