| 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_;
|
| };
|
|
|
|
|