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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 | 113 // Returns the force install list, in format specified by |
114 // ExternalPolicyLoader::AddExtension(). | 114 // ExternalPolicyLoader::AddExtension(). |
115 scoped_ptr<base::DictionaryValue> GetForceInstallList() const; | 115 scoped_ptr<base::DictionaryValue> GetForceInstallList() const; |
116 | 116 |
117 // Returns if an extension with id |id| is allowed to install or not. | 117 // Returns if an extension with id |id| is allowed to install or not. |
118 bool IsInstallationAllowed(const ExtensionId& id) const; | 118 bool IsInstallationAllowed(const ExtensionId& id) const; |
119 | 119 |
120 // Returns true if an extension download should be allowed to proceed. | |
121 bool IsOffstoreInstallAllowed(const GURL& url, const GURL& referrer_url); | |
Joao da Silva
2014/09/12 13:18:40
GURL needs a forward declaration
binjin
2014/09/12 13:35:44
Done.
| |
122 | |
120 // Helper function to read |settings_by_id_| with |id| as key. Returns a | 123 // Helper function to read |settings_by_id_| with |id| as key. Returns a |
121 // constant reference to default settings if |id| does not exist. | 124 // constant reference to default settings if |id| does not exist. |
122 const IndividualSettings& ReadById(const ExtensionId& id) const; | 125 const IndividualSettings& ReadById(const ExtensionId& id) const; |
123 | 126 |
124 // Returns a constant reference to |global_settings_|. | 127 // Returns a constant reference to |global_settings_|. |
125 const GlobalSettings& ReadGlobalSettings() const; | 128 const GlobalSettings& ReadGlobalSettings() const; |
126 | 129 |
127 private: | 130 private: |
128 // Load all extension management preferences from |pref_service|, and | 131 // Load all extension management preferences from |pref_service|, and |
129 // refresh the settings. | 132 // refresh the settings. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 content::BrowserContext* context) const OVERRIDE; | 192 content::BrowserContext* context) const OVERRIDE; |
190 virtual content::BrowserContext* GetBrowserContextToUse( | 193 virtual content::BrowserContext* GetBrowserContextToUse( |
191 content::BrowserContext* context) const OVERRIDE; | 194 content::BrowserContext* context) const OVERRIDE; |
192 | 195 |
193 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); | 196 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); |
194 }; | 197 }; |
195 | 198 |
196 } // namespace extensions | 199 } // namespace extensions |
197 | 200 |
198 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ | 201 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ |
OLD | NEW |