| 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 | |
| 164 // Helper function to access |settings_by_id_| with |id| as key. | 156 // Helper function to access |settings_by_id_| with |id| as key. |
| 165 // Adds a new IndividualSettings entry to |settings_by_id_| if none exists for | 157 // Adds a new IndividualSettings entry to |settings_by_id_| if none exists for |
| 166 // |id| yet. | 158 // |id| yet. |
| 167 internal::IndividualSettings* AccessById(const ExtensionId& id); | 159 internal::IndividualSettings* AccessById(const ExtensionId& id); |
| 168 | 160 |
| 169 // Similar to AccessById(), but access |settings_by_update_url_| instead. | 161 // Similar to AccessById(), but access |settings_by_update_url_| instead. |
| 170 internal::IndividualSettings* AccessByUpdateUrl( | 162 internal::IndividualSettings* AccessByUpdateUrl( |
| 171 const std::string& update_url); | 163 const std::string& update_url); |
| 172 | 164 |
| 173 // A map containing all IndividualSettings applied to an individual extension | 165 // A map containing all IndividualSettings applied to an individual extension |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 content::BrowserContext* context) const override; | 211 content::BrowserContext* context) const override; |
| 220 void RegisterProfilePrefs( | 212 void RegisterProfilePrefs( |
| 221 user_prefs::PrefRegistrySyncable* registry) override; | 213 user_prefs::PrefRegistrySyncable* registry) override; |
| 222 | 214 |
| 223 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); | 215 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); |
| 224 }; | 216 }; |
| 225 | 217 |
| 226 } // namespace extensions | 218 } // namespace extensions |
| 227 | 219 |
| 228 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ | 220 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ |
| OLD | NEW |