Chromium Code Reviews| Index: chrome/browser/extensions/external_registry_loader_win.cc |
| diff --git a/chrome/browser/extensions/external_registry_loader_win.cc b/chrome/browser/extensions/external_registry_loader_win.cc |
| index 0c1088480c2f2fc7d76b71ff0e094b469b24a53e..6f331080d34cf8a44a471ea63bb44eae9eb68c81 100644 |
| --- a/chrome/browser/extensions/external_registry_loader_win.cc |
| +++ b/chrome/browser/extensions/external_registry_loader_win.cc |
| @@ -190,17 +190,20 @@ ExternalRegistryLoader::LoadPrefsOnFileThread() { |
| void ExternalRegistryLoader::LoadOnFileThread() { |
| base::TimeTicks start_time = base::TimeTicks::Now(); |
| - prefs_ = LoadPrefsOnFileThread(); |
| + std::unique_ptr<base::DictionaryValue> prefs = LoadPrefsOnFileThread(); |
| LOCAL_HISTOGRAM_TIMES("Extensions.ExternalRegistryLoaderWin", |
| base::TimeTicks::Now() - start_time); |
| BrowserThread::PostTask( |
| BrowserThread::UI, FROM_HERE, |
| base::Bind(&ExternalRegistryLoader::CompleteLoadAndStartWatchingRegistry, |
| - this)); |
| + this, base::Passed(&prefs))); |
| } |
| -void ExternalRegistryLoader::CompleteLoadAndStartWatchingRegistry() { |
| +void ExternalRegistryLoader::CompleteLoadAndStartWatchingRegistry( |
| + std::unique_ptr<base::DictionaryValue> prefs) { |
| CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| + DCHECK(prefs); |
| + prefs_ = std::move(prefs); |
| LoadFinished(); |
|
Devlin
2017/04/12 19:32:06
I *think* this is safe - or rather, I think this w
lazyboy
2017/04/12 20:56:22
I was actually thinking about that while writing t
|
| // Attempt to watch registry if we haven't already. |