summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_settings_api.h
diff options
context:
space:
mode:
authorkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-22 03:32:07 +0000
committerkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-22 03:32:07 +0000
commitbe80eae925e1bb08b0584e55cd47accceba09390 (patch)
tree2209732664ad91da73883747415c1bddb60ab25c /chrome/browser/extensions/extension_settings_api.h
parent15245b8b5298a41363183deba5f5e156c6d0ac74 (diff)
downloadchromium_src-be80eae925e1bb08b0584e55cd47accceba09390.zip
chromium_src-be80eae925e1bb08b0584e55cd47accceba09390.tar.gz
chromium_src-be80eae925e1bb08b0584e55cd47accceba09390.tar.bz2
Re-commit 106660 with the crashing test disabled. Reverted in 106671.
Add onChanged events to the extension settings API, both from sync and between split mode background pages. BUG=97545 TEST=ExtensionSettingsStorageUnittest, ExtensionSettingsSyncUnittest, ExtensionSettingsApitest Review URL: http://codereview.chromium.org/8177022 TBR=rsleevi@chromium.org Review URL: http://codereview.chromium.org/8361027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_settings_api.h')
-rw-r--r--chrome/browser/extensions/extension_settings_api.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_settings_api.h b/chrome/browser/extensions/extension_settings_api.h
index 886319b..15f3fcb 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_