Index: chrome/browser/extensions/extension_settings_api.cc |
diff --git a/chrome/browser/extensions/extension_settings_api.cc b/chrome/browser/extensions/extension_settings_api.cc |
index 71679018b7711f7b2df0f2380c53aff7f7ba19a2..ad9069030c37442871f5b67f0a0e046590895c44 100644 |
--- a/chrome/browser/extensions/extension_settings_api.cc |
+++ b/chrome/browser/extensions/extension_settings_api.cc |
@@ -16,17 +16,14 @@ const char* kUnsupportedArgumentType = "Unsupported argument type"; |
// SettingsFunction |
bool SettingsFunction::RunImpl() { |
- BrowserThread::PostTask( |
- BrowserThread::FILE, |
- FROM_HERE, |
- base::Bind(&SettingsFunction::RunOnFileThread, this)); |
+ profile()->GetExtensionService()->extension_settings()->RunWithSettings( |
+ base::Bind(&SettingsFunction::RunWithSettingsOnFileThread, this)); |
return true; |
} |
-void SettingsFunction::RunOnFileThread() { |
+void SettingsFunction::RunWithSettingsOnFileThread( |
+ ExtensionSettings* settings) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
- ExtensionSettings* settings = |
- profile()->GetExtensionService()->extension_settings(); |
bool success = RunWithStorage(settings->GetStorage(extension_id())); |
BrowserThread::PostTask( |
BrowserThread::UI, |