Chromium Code Reviews| 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)); |