| 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 EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 bool ReadPrefAsDictionary( | 244 bool ReadPrefAsDictionary( |
| 245 const std::string& extension_id, | 245 const std::string& extension_id, |
| 246 const std::string& pref_key, | 246 const std::string& pref_key, |
| 247 const base::DictionaryValue** out_value) const override; | 247 const base::DictionaryValue** out_value) const override; |
| 248 | 248 |
| 249 bool HasPrefForExtension(const std::string& extension_id) const override; | 249 bool HasPrefForExtension(const std::string& extension_id) const override; |
| 250 | 250 |
| 251 // Did the extension ask to escalate its permission during an upgrade? | 251 // Did the extension ask to escalate its permission during an upgrade? |
| 252 bool DidExtensionEscalatePermissions(const std::string& id) const; | 252 bool DidExtensionEscalatePermissions(const std::string& id) const; |
| 253 | 253 |
| 254 // If |did_escalate| is true, the preferences for |extension| will be set to | |
| 255 // require the install warning when the user tries to enable. | |
| 256 void SetDidExtensionEscalatePermissions( | |
| 257 const Extension* extension, | |
| 258 bool did_escalate); | |
| 259 | |
| 260 // Getters and setters for disabled reason. | 254 // Getters and setters for disabled reason. |
| 261 int GetDisableReasons(const std::string& extension_id) const; | 255 int GetDisableReasons(const std::string& extension_id) const; |
| 262 bool HasDisableReason(const std::string& extension_id, | 256 bool HasDisableReason(const std::string& extension_id, |
| 263 Extension::DisableReason disable_reason) const; | 257 Extension::DisableReason disable_reason) const; |
| 264 void AddDisableReason(const std::string& extension_id, | 258 void AddDisableReason(const std::string& extension_id, |
| 265 Extension::DisableReason disable_reason); | 259 Extension::DisableReason disable_reason); |
| 266 void AddDisableReasons(const std::string& extension_id, int disable_reasons); | 260 void AddDisableReasons(const std::string& extension_id, int disable_reasons); |
| 267 void RemoveDisableReason(const std::string& extension_id, | 261 void RemoveDisableReason(const std::string& extension_id, |
| 268 Extension::DisableReason disable_reason); | 262 Extension::DisableReason disable_reason); |
| 269 void ClearDisableReasons(const std::string& extension_id); | 263 void ClearDisableReasons(const std::string& extension_id); |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 bool extensions_disabled_; | 683 bool extensions_disabled_; |
| 690 | 684 |
| 691 ObserverList<ExtensionPrefsObserver> observer_list_; | 685 ObserverList<ExtensionPrefsObserver> observer_list_; |
| 692 | 686 |
| 693 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 687 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 694 }; | 688 }; |
| 695 | 689 |
| 696 } // namespace extensions | 690 } // namespace extensions |
| 697 | 691 |
| 698 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 692 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| OLD | NEW |