Index: chrome/browser/extensions/settings/settings_storage.h |
diff --git a/chrome/browser/extensions/settings/settings_storage.h b/chrome/browser/extensions/settings/settings_storage.h |
index 56225c8bf8783f0f656a77d3c0b82ff751a7d2c2..da783657f96165c3871f73cc731e3949d0aacbb0 100644 |
--- a/chrome/browser/extensions/settings/settings_storage.h |
+++ b/chrome/browser/extensions/settings/settings_storage.h |
@@ -89,6 +89,17 @@ class SettingsStorage { |
scoped_refptr<Inner> inner_; |
}; |
+ // Options for write operations. |
+ enum WriteOptions { |
not at google - send to devlin
2011/11/17 07:02:53
Change #2: the WriteOptions enum and changes to th
|
+ // Callers should usually use this. |
+ DEFAULTS, |
+ |
+ // Ignore restrictions, such as quota. It is still possible for the |
+ // operation to fail, such as on hard drive failure or if the storage area |
+ // is configured to fail. |
+ FORCE |
+ }; |
+ |
virtual ~SettingsStorage() {} |
// Gets a single value from storage. |
@@ -101,19 +112,23 @@ class SettingsStorage { |
virtual ReadResult Get() = 0; |
// Sets a single key to a new value. |
- virtual WriteResult Set(const std::string& key, const Value& value) = 0; |
+ virtual WriteResult Set( |
+ WriteOptions options, const std::string& key, const Value& value) = 0; |
// Sets multiple keys to new values. |
- virtual WriteResult Set(const DictionaryValue& values) = 0; |
+ virtual WriteResult Set( |
+ WriteOptions options, const DictionaryValue& values) = 0; |
// Removes a key from the storage. |
- virtual WriteResult Remove(const std::string& key) = 0; |
+ virtual WriteResult Remove( |
+ WriteOptions options, const std::string& key) = 0; |
// Removes multiple keys from the storage. |
- virtual WriteResult Remove(const std::vector<std::string>& keys) = 0; |
+ virtual WriteResult Remove( |
+ WriteOptions options, const std::vector<std::string>& keys) = 0; |
// Clears the storage. |
- virtual WriteResult Clear() = 0; |
+ virtual WriteResult Clear(WriteOptions options) = 0; |
}; |
} // namespace extensions |