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

Unified Diff: chrome/browser/extensions/settings/settings_frontend.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_frontend.h
diff --git a/chrome/browser/extensions/settings/settings_frontend.h b/chrome/browser/extensions/settings/settings_frontend.h
index e007b9fc07e3fc5f13d4a9b338e40fe90d30e18c..c651bb2805b490e26325be19018e7887150cae04 100644
--- a/chrome/browser/extensions/settings/settings_frontend.h
+++ b/chrome/browser/extensions/settings/settings_frontend.h
@@ -16,6 +16,7 @@
#include "chrome/browser/extensions/settings/settings_leveldb_storage.h"
#include "chrome/browser/extensions/settings/settings_namespace.h"
#include "chrome/browser/extensions/settings/settings_observer.h"
+#include "chrome/browser/extensions/settings/settings_storage_quota_enforcer.h"
#include "chrome/browser/sync/api/syncable_service.h"
class Profile;
@@ -29,9 +30,11 @@ class SettingsStorage;
// All public methods must be called on the UI thread.
class SettingsFrontend {
public:
- // Creates with the default factory. Ownership of |profile| not taken.
+ // Creates with the default factory. Ownership of |profile| not taken.
static SettingsFrontend* Create(Profile* profile);
+ // Creates with a specific factory |storage_factory| (presumably for tests).
+ // Ownership of |profile| not taken.
static SettingsFrontend* Create(
const scoped_refptr<SettingsStorageFactory>& storage_factory,
// Owership NOT taken.
@@ -67,6 +70,11 @@ class SettingsFrontend {
// Ownership NOT taken.
Profile* profile);
+ // The quota limit configurations for the local and sync areas, taken out of
+ // the schema in chrome/common/extensions/api/storage.json.
+ const SettingsStorageQuotaEnforcer::Limits local_quota_limit_;
+ const SettingsStorageQuotaEnforcer::Limits sync_quota_limit_;
+
// The (non-incognito) Profile this Frontend belongs to.
Profile* const profile_;
« no previous file with comments | « chrome/browser/extensions/settings/settings_api.cc ('k') | chrome/browser/extensions/settings/settings_frontend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698