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

Side by Side Diff: chrome/browser/extensions/extension_special_storage_policy.h

Issue 2441083002: Use threadsafe version of GetPermissionStatus in ExtensionSpecialStoragePolicy (Closed)
Patch Set: git cl try Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_special_storage_policy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
11 11
12 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "extensions/common/extension_set.h" 14 #include "extensions/common/extension_set.h"
15 #include "storage/browser/quota/special_storage_policy.h" 15 #include "storage/browser/quota/special_storage_policy.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 namespace content { 18 namespace content {
19 class BrowserContext; 19 class BrowserContext;
20 } 20 }
21 21
22 namespace content_settings { 22 namespace content_settings {
23 class CookieSettings; 23 class CookieSettings;
24 } 24 }
25 25
26 namespace extensions { 26 namespace extensions {
27 class Extension; 27 class Extension;
28 } 28 }
29 29
30 class PermissionManager;
31
30 // Special rights are granted to 'extensions' and 'applications'. The 32 // Special rights are granted to 'extensions' and 'applications'. The
31 // storage subsystems and the browsing data remover query this interface 33 // storage subsystems and the browsing data remover query this interface
32 // to determine which origins have these rights. 34 // to determine which origins have these rights.
33 class ExtensionSpecialStoragePolicy : public storage::SpecialStoragePolicy { 35 class ExtensionSpecialStoragePolicy : public storage::SpecialStoragePolicy {
34 public: 36 public:
35 explicit ExtensionSpecialStoragePolicy(Profile* profile); 37 explicit ExtensionSpecialStoragePolicy(Profile* profile);
36 38
37 // storage::SpecialStoragePolicy methods used by storage subsystems and the 39 // storage::SpecialStoragePolicy methods used by storage subsystems and the
38 // browsing data remover. These methods are safe to call on any thread. 40 // browsing data remover. These methods are safe to call on any thread.
39 bool IsStorageProtected(const GURL& origin) override; 41 bool IsStorageProtected(const GURL& origin) override;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 90
89 base::Lock lock_; // Synchronize all access to the collections. 91 base::Lock lock_; // Synchronize all access to the collections.
90 SpecialCollection protected_apps_; 92 SpecialCollection protected_apps_;
91 SpecialCollection installed_apps_; 93 SpecialCollection installed_apps_;
92 SpecialCollection unlimited_extensions_; 94 SpecialCollection unlimited_extensions_;
93 SpecialCollection file_handler_extensions_; 95 SpecialCollection file_handler_extensions_;
94 SpecialCollection isolated_extensions_; 96 SpecialCollection isolated_extensions_;
95 SpecialCollection content_capabilities_unlimited_extensions_; 97 SpecialCollection content_capabilities_unlimited_extensions_;
96 98
97 scoped_refptr<content_settings::CookieSettings> cookie_settings_; 99 scoped_refptr<content_settings::CookieSettings> cookie_settings_;
100 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
101 PermissionManager* permission_manager_;
98 Profile* profile_; 102 Profile* profile_;
99 }; 103 };
100 104
101 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_ 105 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SPECIAL_STORAGE_POLICY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_special_storage_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698