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

Unified Diff: chrome/browser/extensions/settings/settings_storage.h

Issue 9284013: Extension Storage API: expose storage quota information to extensions, via: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with use-after-free fixed Created 8 years, 11 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/settings/settings_storage.h
diff --git a/chrome/browser/extensions/settings/settings_storage.h b/chrome/browser/extensions/settings/settings_storage.h
index 4c5c67403ff1bef61b8c57a6512b16d48aa85ac4..51cc6032b6b568b95e3a6aaefee2e9cb9bf3dba4 100644
--- a/chrome/browser/extensions/settings/settings_storage.h
+++ b/chrome/browser/extensions/settings/settings_storage.h
@@ -100,6 +100,15 @@ class SettingsStorage {
virtual ~SettingsStorage() {}
+ // Gets the amount of space being used by a single value, in bytes.
+ virtual size_t GetBytesInUse(const std::string& key) = 0;
+
+ // Gets the total amount of space being used by multiple values, in bytes.
+ virtual size_t GetBytesInUse(const std::vector<std::string>& keys) = 0;
+
+ // Gets the total amount of space being used by this storage area, in bytes.
+ virtual size_t GetBytesInUse() = 0;
+
// Gets a single value from storage.
virtual ReadResult Get(const std::string& key) = 0;

Powered by Google App Engine
This is Rietveld 408576698