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

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

Issue 8177022: Add onChanged events to the extension settings API, both from sync and between (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 2 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.h
diff --git a/chrome/browser/extensions/extension_settings_api.h b/chrome/browser/extensions/extension_settings_api.h
index 886319bb4f4c2737640cf270252b2a511ae516df..15f3fcb867bb10d89af4fd02e1de87bd2c5c50ca 100644
--- a/chrome/browser/extensions/extension_settings_api.h
+++ b/chrome/browser/extensions/extension_settings_api.h
@@ -21,11 +21,15 @@ class SettingsFunction : public AsyncExtensionFunction {
//
// Implementations should fill in args themselves, though (like RunImpl)
// may return false to imply failure.
- virtual bool RunWithStorage(ExtensionSettingsStorage* storage) = 0;
+ virtual bool RunWithStorage(
+ ExtensionSettingsBackend* backend,
+ ExtensionSettingsStorage* storage) = 0;
// Sets error_ or result_ depending on the value of a storage Result, and
// returns whether the Result implies success (i.e. !error).
- bool UseResult(const ExtensionSettingsStorage::Result& storage_result);
+ bool UseResult(
+ ExtensionSettingsBackend* backend,
+ const ExtensionSettingsStorage::Result& storage_result);
private:
// Called via PostTask from RunImpl. Calls RunWithStorage and then
@@ -38,7 +42,9 @@ class GetSettingsFunction : public SettingsFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.settings.get");
protected:
- virtual bool RunWithStorage(ExtensionSettingsStorage* storage) OVERRIDE;
+ virtual bool RunWithStorage(
+ ExtensionSettingsBackend* backend,
+ ExtensionSettingsStorage* storage) OVERRIDE;
};
class SetSettingsFunction : public SettingsFunction {
@@ -46,7 +52,9 @@ class SetSettingsFunction : public SettingsFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.settings.set");
protected:
- virtual bool RunWithStorage(ExtensionSettingsStorage* storage) OVERRIDE;
+ virtual bool RunWithStorage(
+ ExtensionSettingsBackend* backend,
+ ExtensionSettingsStorage* storage) OVERRIDE;
};
class RemoveSettingsFunction : public SettingsFunction {
@@ -54,7 +62,9 @@ class RemoveSettingsFunction : public SettingsFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.settings.remove");
protected:
- virtual bool RunWithStorage(ExtensionSettingsStorage* storage) OVERRIDE;
+ virtual bool RunWithStorage(
+ ExtensionSettingsBackend* backend,
+ ExtensionSettingsStorage* storage) OVERRIDE;
};
class ClearSettingsFunction : public SettingsFunction {
@@ -62,7 +72,9 @@ class ClearSettingsFunction : public SettingsFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.settings.clear");
protected:
- virtual bool RunWithStorage(ExtensionSettingsStorage* storage) OVERRIDE;
+ virtual bool RunWithStorage(
+ ExtensionSettingsBackend* backend,
+ ExtensionSettingsStorage* storage) OVERRIDE;
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_API_H_

Powered by Google App Engine
This is Rietveld 408576698