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

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

Issue 7775008: Enable sync for the settings from the Extension Settings API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Review #5 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..49a6e0166f6eccdb510e483f4446921168ff84e3 100644
--- a/chrome/browser/extensions/extension_settings_api.cc
+++ b/chrome/browser/extensions/extension_settings_api.cc
@@ -16,18 +16,16 @@ 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()->RunWithStorage(
+ extension_id(),
+ base::Bind(&SettingsFunction::RunWithStorageOnFileThread, this));
return true;
}
-void SettingsFunction::RunOnFileThread() {
+void SettingsFunction::RunWithStorageOnFileThread(
+ ExtensionSettingsStorage* storage) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- ExtensionSettings* settings =
- profile()->GetExtensionService()->extension_settings();
- bool success = RunWithStorage(settings->GetStorage(extension_id()));
+ bool success = RunWithStorage(storage);
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698