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

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: review 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 3d35568f7d48e730e31287e96ffeed5a0be3a30e..4a0789d1ddd0630aafd2fe670a03f217980d4bf7 100644
--- a/chrome/browser/extensions/extension_special_storage_policy.h
+++ b/chrome/browser/extensions/extension_special_storage_policy.h
@@ -10,6 +10,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"
@@ -42,6 +43,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();
@@ -52,16 +57,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_;
};

Powered by Google App Engine
This is Rietveld 408576698