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 <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // If |force_managed| is true, only loading from the managed preference store | 146 // If |force_managed| is true, only loading from the managed preference store |
147 // is allowed. Returns NULL if the preference is not present, not allowed to | 147 // is allowed. Returns NULL if the preference is not present, not allowed to |
148 // be loaded from or has the wrong type. | 148 // be loaded from or has the wrong type. |
149 const base::Value* LoadPreference(const char* pref_name, | 149 const base::Value* LoadPreference(const char* pref_name, |
150 bool force_managed, | 150 bool force_managed, |
151 base::Value::Type expected_type); | 151 base::Value::Type expected_type); |
152 | 152 |
153 void OnExtensionPrefChanged(); | 153 void OnExtensionPrefChanged(); |
154 void NotifyExtensionManagementPrefChanged(); | 154 void NotifyExtensionManagementPrefChanged(); |
155 | 155 |
| 156 // Helper to update |extension_dict| for forced installs. |
| 157 void UpdateForcedExtensions(const base::DictionaryValue* extension_dict); |
| 158 |
| 159 // Helper to return an extension install list, in format specified by |
| 160 // ExternalPolicyLoader::AddExtension(). |
| 161 std::unique_ptr<base::DictionaryValue> GetInstallListByMode( |
| 162 InstallationMode installation_mode) const; |
| 163 |
156 // Helper function to access |settings_by_id_| with |id| as key. | 164 // Helper function to access |settings_by_id_| with |id| as key. |
157 // Adds a new IndividualSettings entry to |settings_by_id_| if none exists for | 165 // Adds a new IndividualSettings entry to |settings_by_id_| if none exists for |
158 // |id| yet. | 166 // |id| yet. |
159 internal::IndividualSettings* AccessById(const ExtensionId& id); | 167 internal::IndividualSettings* AccessById(const ExtensionId& id); |
160 | 168 |
161 // Similar to AccessById(), but access |settings_by_update_url_| instead. | 169 // Similar to AccessById(), but access |settings_by_update_url_| instead. |
162 internal::IndividualSettings* AccessByUpdateUrl( | 170 internal::IndividualSettings* AccessByUpdateUrl( |
163 const std::string& update_url); | 171 const std::string& update_url); |
164 | 172 |
165 // A map containing all IndividualSettings applied to an individual extension | 173 // A map containing all IndividualSettings applied to an individual extension |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 content::BrowserContext* context) const override; | 219 content::BrowserContext* context) const override; |
212 void RegisterProfilePrefs( | 220 void RegisterProfilePrefs( |
213 user_prefs::PrefRegistrySyncable* registry) override; | 221 user_prefs::PrefRegistrySyncable* registry) override; |
214 | 222 |
215 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); | 223 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); |
216 }; | 224 }; |
217 | 225 |
218 } // namespace extensions | 226 } // namespace extensions |
219 | 227 |
220 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ | 228 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ |
OLD | NEW |