OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MANAGEMENT_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 // Get the ManagementPolicy::Provider controlled by extension management | 104 // Get the ManagementPolicy::Provider controlled by extension management |
105 // policy settings. | 105 // policy settings. |
106 ManagementPolicy::Provider* GetProvider(); | 106 ManagementPolicy::Provider* GetProvider(); |
107 | 107 |
108 // Checks if extensions are blacklisted by default, by policy. When true, | 108 // Checks if extensions are blacklisted by default, by policy. When true, |
109 // this means that even extensions without an ID should be blacklisted (e.g. | 109 // this means that even extensions without an ID should be blacklisted (e.g. |
110 // from the command line, or when loaded as an unpacked extension). | 110 // from the command line, or when loaded as an unpacked extension). |
111 bool BlacklistedByDefault(); | 111 bool BlacklistedByDefault(); |
112 | 112 |
| 113 // Returns the force install list, in format specified by |
| 114 // ExternalPolicyLoader::AddExtension(). |
| 115 scoped_ptr<base::DictionaryValue> GetForceInstallList() const; |
| 116 |
| 117 // Returns if an extension with id |id| is allowed to install or not. |
| 118 bool IsInstallationAllowed(const ExtensionId& id) const; |
| 119 |
113 // Helper function to read |settings_by_id_| with |id| as key. Returns a | 120 // Helper function to read |settings_by_id_| with |id| as key. Returns a |
114 // constant reference to default settings if |id| does not exist. | 121 // constant reference to default settings if |id| does not exist. |
115 const IndividualSettings& ReadById(const ExtensionId& id) const; | 122 const IndividualSettings& ReadById(const ExtensionId& id) const; |
116 | 123 |
117 // Returns a constant reference to |global_settings_|. | 124 // Returns a constant reference to |global_settings_|. |
118 const GlobalSettings& ReadGlobalSettings() const; | 125 const GlobalSettings& ReadGlobalSettings() const; |
119 | 126 |
120 private: | 127 private: |
121 // Load all extension management preferences from |pref_service|, and | 128 // Load all extension management preferences from |pref_service|, and |
122 // refresh the settings. | 129 // refresh the settings. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // BrowserContextKeyedServiceExtensionManagementFactory: | 187 // BrowserContextKeyedServiceExtensionManagementFactory: |
181 virtual KeyedService* BuildServiceInstanceFor( | 188 virtual KeyedService* BuildServiceInstanceFor( |
182 content::BrowserContext* context) const OVERRIDE; | 189 content::BrowserContext* context) const OVERRIDE; |
183 | 190 |
184 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); | 191 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); |
185 }; | 192 }; |
186 | 193 |
187 } // namespace extensions | 194 } // namespace extensions |
188 | 195 |
189 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ | 196 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ |
OLD | NEW |