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

Unified Diff: chrome/browser/extensions/extension_settings_api.cc

Issue 7977018: Enable sync for the settings from the Extension Settings API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix race condition in ExtensionSettingsUIWrapper::Core Created 9 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: 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,

Powered by Google App Engine
This is Rietveld 408576698