summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_service.h
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-13 21:59:48 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-13 21:59:48 +0000
commitc2c263cd9f2ac658d6dc35ecbd4551ca0c5cb154 (patch)
tree519a7a765fd452637ca925f7a29794524e9cee32 /chrome/browser/extensions/extensions_service.h
parent3f4512be44cac7c017d93d4beedd0d6b49bec737 (diff)
downloadchromium_src-c2c263cd9f2ac658d6dc35ecbd4551ca0c5cb154.zip
chromium_src-c2c263cd9f2ac658d6dc35ecbd4551ca0c5cb154.tar.gz
chromium_src-c2c263cd9f2ac658d6dc35ecbd4551ca0c5cb154.tar.bz2
Grant ChromeApplications unlimited appcache and database storage if requested.
BUG=49227,49993 TEST=ExtensionsServiceTest.InstallAppsWithUnlimtedStorage Review URL: http://codereview.chromium.org/3053048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_service.h')
-rw-r--r--chrome/browser/extensions/extensions_service.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index 4290f2e..0506299 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -384,6 +384,10 @@ class ExtensionsService
// Helper method. Loads extension from prefs.
void LoadInstalledExtension(const ExtensionInfo& info, bool relocalize);
+ // Helper methods to configure the storage services accordingly.
+ void GrantUnlimitedStorage(Extension* extension);
+ void RevokeUnlimitedStorage(Extension* extension);
+
// The profile this ExtensionsService is part of.
Profile* profile_;
@@ -446,9 +450,16 @@ class ExtensionsService
typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions;
RegisteredComponentExtensions component_extension_manifests_;
+ // Collection of origins we've granted unlimited storage to. This is a
+ // map from origin to the number of extensions requiring unlimited
+ // storage within that origin.
+ typedef std::map<GURL, int> UnlimitedStorageMap;
+ UnlimitedStorageMap unlimited_storage_map_;
+
FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest,
UpdatePendingExtensionAlreadyInstalled);
-
+ FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest,
+ InstallAppsWithUnlimtedStorage);
DISALLOW_COPY_AND_ASSIGN(ExtensionsService);
};