OLD | NEW |
---|---|
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_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 const syncer::StringOrdinal& page_ordinal); | 183 const syncer::StringOrdinal& page_ordinal); |
184 | 184 |
185 // Called when an extension is uninstalled, so that prefs get cleaned up. | 185 // Called when an extension is uninstalled, so that prefs get cleaned up. |
186 void OnExtensionUninstalled(const std::string& extension_id, | 186 void OnExtensionUninstalled(const std::string& extension_id, |
187 const Manifest::Location& location, | 187 const Manifest::Location& location, |
188 bool external_uninstall); | 188 bool external_uninstall); |
189 | 189 |
190 // Called to change the extension's state when it is enabled/disabled. | 190 // Called to change the extension's state when it is enabled/disabled. |
191 void SetExtensionState(const std::string& extension_id, Extension::State); | 191 void SetExtensionState(const std::string& extension_id, Extension::State); |
192 | 192 |
193 // Called to change the extension's state when it is enabled/disabled. | |
194 void SetExtensionGreylisted(const std::string& extension_id, bool state); | |
195 | |
196 // Checks whether |extension_id| is marked as greylisted. | |
197 bool IsExtensionGreylisted(const std::string& extension_id); | |
198 | |
193 // Populates |out| with the ids of all installed extensions. | 199 // Populates |out| with the ids of all installed extensions. |
194 void GetExtensions(ExtensionIdList* out); | 200 void GetExtensions(ExtensionIdList* out); |
195 | 201 |
196 // ExtensionScopedPrefs methods: | 202 // ExtensionScopedPrefs methods: |
197 virtual void UpdateExtensionPref(const std::string& id, | 203 virtual void UpdateExtensionPref(const std::string& id, |
198 const std::string& key, | 204 const std::string& key, |
199 base::Value* value) OVERRIDE; | 205 base::Value* value) OVERRIDE; |
200 | 206 |
201 virtual void DeleteExtensionPrefs(const std::string& id) OVERRIDE; | 207 virtual void DeleteExtensionPrefs(const std::string& id) OVERRIDE; |
202 | 208 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
234 bool did_escalate); | 240 bool did_escalate); |
235 | 241 |
236 // Getter and setters for disabled reason. | 242 // Getter and setters for disabled reason. |
237 int GetDisableReasons(const std::string& extension_id) const; | 243 int GetDisableReasons(const std::string& extension_id) const; |
238 void AddDisableReason(const std::string& extension_id, | 244 void AddDisableReason(const std::string& extension_id, |
239 Extension::DisableReason disable_reason); | 245 Extension::DisableReason disable_reason); |
240 void RemoveDisableReason(const std::string& extension_id, | 246 void RemoveDisableReason(const std::string& extension_id, |
241 Extension::DisableReason disable_reason); | 247 Extension::DisableReason disable_reason); |
242 void ClearDisableReasons(const std::string& extension_id); | 248 void ClearDisableReasons(const std::string& extension_id); |
243 | 249 |
244 // Gets the set of extensions that have been blacklisted in prefs. | 250 // Gets the set of extensions that have been blacklisted in prefs. |
not at google - send to devlin
2014/01/22 00:33:14
you might want to add a comment here and below exp
Oleg Eterevsky
2014/01/22 21:25:04
Actually, no blacklisted here will returned only m
| |
245 std::set<std::string> GetBlacklistedExtensions(); | 251 std::set<std::string> GetBlacklistedExtensions(); |
246 | 252 |
247 // Sets whether the extension with |id| is blacklisted. | 253 // Sets whether the extension with |id| is blacklisted. |
248 void SetExtensionBlacklisted(const std::string& extension_id, | 254 void SetExtensionBlacklisted(const std::string& extension_id, |
249 bool is_blacklisted); | 255 bool is_blacklisted); |
250 | 256 |
251 // Returns the version string for the currently installed extension, or | 257 // Returns the version string for the currently installed extension, or |
252 // the empty string if not found. | 258 // the empty string if not found. |
253 std::string GetVersionString(const std::string& extension_id); | 259 std::string GetVersionString(const std::string& extension_id); |
254 | 260 |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
628 scoped_ptr<TimeProvider> time_provider_; | 634 scoped_ptr<TimeProvider> time_provider_; |
629 | 635 |
630 bool extensions_disabled_; | 636 bool extensions_disabled_; |
631 | 637 |
632 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 638 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
633 }; | 639 }; |
634 | 640 |
635 } // namespace extensions | 641 } // namespace extensions |
636 | 642 |
637 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 643 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
OLD | NEW |