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

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: . 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..71af9adca903433aa8457b766d8f08d743f0657f 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,9 @@ 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.
+ const ExtensionSet* ExtensionsProtectingOrigin(const GURL& origin);
marja 2012/07/09 08:11:43 Caller doesn't take ownership of the returned poin
Bernhard Bauer 2012/07/09 09:50:48 Hm, I usually assume that the default is that the
marja 2012/07/09 09:55:02 Yes, true, the default might be no-ownership-trans
+
protected:
virtual ~ExtensionSpecialStoragePolicy();
@@ -52,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_;
};

Powered by Google App Engine
This is Rietveld 408576698