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

Unified Diff: chrome/renderer/resources/extensions/storage_custom_bindings.js

Issue 9284013: Extension Storage API: expose storage quota information to extensions, via: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/renderer/resources/extensions/storage_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/storage_custom_bindings.js b/chrome/renderer/resources/extensions/storage_custom_bindings.js
index cd58774f5be0757b63838b22a0d9558d59bdeb62..1d358c29b7f01d967aa458941c22656072ac690c 100644
--- a/chrome/renderer/resources/extensions/storage_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/storage_custom_bindings.js
@@ -10,8 +10,7 @@ native function GetChromeHidden();
var chromeHidden = GetChromeHidden();
-chromeHidden.registerCustomType('StorageNamespace',
- function(typesAPI) {
+chromeHidden.registerCustomType('StorageArea', function(typesAPI) {
var sendRequest = typesAPI.sendRequest;
function extendSchema(schema) {
@@ -20,7 +19,7 @@ chromeHidden.registerCustomType('StorageNamespace',
return extendedSchema;
}
- function StorageNamespace(namespace, schema) {
+ function StorageArea(namespace, schema) {
// Binds an API function for a namespace to its browser-side call, e.g.
// storage.sync.get('foo') -> (binds to) ->
// storage.get('sync', 'foo').
@@ -38,10 +37,11 @@ chromeHidden.registerCustomType('StorageNamespace',
extendSchema(schema));
};
}
- ['get', 'set', 'remove', 'clear'].forEach(bindApiFunction.bind(this));
+ var apiFunctions = ['get', 'set', 'remove', 'clear', 'getBytesInUse'];
+ apiFunctions.forEach(bindApiFunction.bind(this));
}
- return StorageNamespace;
+ return StorageArea;
});
})();

Powered by Google App Engine
This is Rietveld 408576698