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..aefc41a5c2f4c73e8f815fbad7166a75742d177e 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 { |
+ // 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,10 +112,12 @@ 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; |