OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 21 matching lines...) Expand all Loading... |
32 class ExtensionSpecialStoragePolicy : public storage::SpecialStoragePolicy { | 32 class ExtensionSpecialStoragePolicy : public storage::SpecialStoragePolicy { |
33 public: | 33 public: |
34 explicit ExtensionSpecialStoragePolicy( | 34 explicit ExtensionSpecialStoragePolicy( |
35 content_settings::CookieSettings* cookie_settings); | 35 content_settings::CookieSettings* cookie_settings); |
36 | 36 |
37 // storage::SpecialStoragePolicy methods used by storage subsystems and the | 37 // storage::SpecialStoragePolicy methods used by storage subsystems and the |
38 // browsing data remover. These methods are safe to call on any thread. | 38 // browsing data remover. These methods are safe to call on any thread. |
39 bool IsStorageProtected(const GURL& origin) override; | 39 bool IsStorageProtected(const GURL& origin) override; |
40 bool IsStorageUnlimited(const GURL& origin) override; | 40 bool IsStorageUnlimited(const GURL& origin) override; |
41 bool IsStorageSessionOnly(const GURL& origin) override; | 41 bool IsStorageSessionOnly(const GURL& origin) override; |
| 42 bool CanQueryDiskSize(const GURL& origin) override; |
42 bool HasIsolatedStorage(const GURL& origin) override; | 43 bool HasIsolatedStorage(const GURL& origin) override; |
43 bool HasSessionOnlyOrigins() override; | 44 bool HasSessionOnlyOrigins() override; |
44 bool IsStorageDurable(const GURL& origin) override; | 45 bool IsStorageDurable(const GURL& origin) override; |
45 | 46 |
46 // Methods used by the ExtensionService to populate this class. | 47 // Methods used by the ExtensionService to populate this class. |
47 void GrantRightsForExtension(const extensions::Extension* extension, | 48 void GrantRightsForExtension(const extensions::Extension* extension, |
48 content::BrowserContext* browser_context); | 49 content::BrowserContext* browser_context); |
49 void RevokeRightsForExtension(const extensions::Extension* extension); | 50 void RevokeRightsForExtension(const extensions::Extension* extension); |
50 void RevokeRightsForAllExtensions(); | 51 void RevokeRightsForAllExtensions(); |
51 | 52 |
(...skipping 28 matching lines...) Expand all Loading... |
80 extensions::ExtensionSet extensions_; | 81 extensions::ExtensionSet extensions_; |
81 std::map<GURL, std::unique_ptr<extensions::ExtensionSet>> cached_results_; | 82 std::map<GURL, std::unique_ptr<extensions::ExtensionSet>> cached_results_; |
82 }; | 83 }; |
83 | 84 |
84 void NotifyGranted(const GURL& origin, int change_flags); | 85 void NotifyGranted(const GURL& origin, int change_flags); |
85 void NotifyRevoked(const GURL& origin, int change_flags); | 86 void NotifyRevoked(const GURL& origin, int change_flags); |
86 void NotifyCleared(); | 87 void NotifyCleared(); |
87 | 88 |
88 base::Lock lock_; // Synchronize all access to the collections. | 89 base::Lock lock_; // Synchronize all access to the collections. |
89 SpecialCollection protected_apps_; | 90 SpecialCollection protected_apps_; |
| 91 SpecialCollection installed_apps_; |
90 SpecialCollection unlimited_extensions_; | 92 SpecialCollection unlimited_extensions_; |
91 SpecialCollection file_handler_extensions_; | 93 SpecialCollection file_handler_extensions_; |
92 SpecialCollection isolated_extensions_; | 94 SpecialCollection isolated_extensions_; |
93 SpecialCollection content_capabilities_unlimited_extensions_; | 95 SpecialCollection content_capabilities_unlimited_extensions_; |
94 scoped_refptr<content_settings::CookieSettings> cookie_settings_; | 96 scoped_refptr<content_settings::CookieSettings> cookie_settings_; |
95 }; | 97 }; |
96 | 98 |
97 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_ | 99 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_ |
OLD | NEW |