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

Unified Diff: chrome/browser/extensions/extension_special_storage_policy.h

Issue 10709006: Show apps protecting local data in chrome://settings/cookies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: argh Created 8 years, 5 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/extension_special_storage_policy.h
diff --git a/chrome/browser/extensions/extension_special_storage_policy.h b/chrome/browser/extensions/extension_special_storage_policy.h
index a1d05d97a417de2dea33f3f753bbe9a3a506b175..90e9215a0ba2250650a62565ffe5d0030ac30a48 100644
--- a/chrome/browser/extensions/extension_special_storage_policy.h
+++ b/chrome/browser/extensions/extension_special_storage_policy.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/synchronization/lock.h"
+#include "chrome/common/extensions/extension_set.h"
#include "googleurl/src/gurl.h"
#include "webkit/quota/special_storage_policy.h"
@@ -41,6 +42,10 @@ class ExtensionSpecialStoragePolicy : public quota::SpecialStoragePolicy {
// Decides whether the storage for |extension|'s web extent needs protection.
bool NeedsProtection(const extensions::Extension* extension);
+ // Returns the set of extensions protecting this origin. The caller does not
+ // take ownership of the return value.
+ const ExtensionSet* ExtensionsProtectingOrigin(const GURL& origin);
+
protected:
virtual ~ExtensionSpecialStoragePolicy();
@@ -51,16 +56,18 @@ class ExtensionSpecialStoragePolicy : public quota::SpecialStoragePolicy {
~SpecialCollection();
bool Contains(const GURL& origin);
+ const ExtensionSet* ExtensionsContaining(const GURL& origin);
bool ContainsExtension(const std::string& extension_id);
void Add(const extensions::Extension* extension);
void Remove(const extensions::Extension* extension);
void Clear();
private:
- typedef std::map<GURL, bool> CachedResults;
- typedef std::map<std::string, scoped_refptr<const extensions::Extension> >
- Extensions;
- Extensions extensions_;
+ typedef std::map<GURL, ExtensionSet*> CachedResults;
+
+ void ClearCache();
+
+ ExtensionSet extensions_;
CachedResults cached_results_;
};
« no previous file with comments | « chrome/browser/cookies_tree_model_unittest.cc ('k') | chrome/browser/extensions/extension_special_storage_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698