| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 const base::DictionaryValue* GetExtensionPref(const std::string& id) const; | 615 const base::DictionaryValue* GetExtensionPref(const std::string& id) const; |
| 616 | 616 |
| 617 // Modifies the extensions disable reasons to add a new reason, remove an | 617 // Modifies the extensions disable reasons to add a new reason, remove an |
| 618 // existing reason, or clear all reasons. Notifies observers if the set of | 618 // existing reason, or clear all reasons. Notifies observers if the set of |
| 619 // DisableReasons has changed. | 619 // DisableReasons has changed. |
| 620 // If |change| is DISABLE_REASON_CLEAR, then |reason| is ignored. | 620 // If |change| is DISABLE_REASON_CLEAR, then |reason| is ignored. |
| 621 void ModifyDisableReasons(const std::string& extension_id, | 621 void ModifyDisableReasons(const std::string& extension_id, |
| 622 int reasons, | 622 int reasons, |
| 623 DisableReasonChange change); | 623 DisableReasonChange change); |
| 624 | 624 |
| 625 // Fix missing preference entries in the extensions that are were introduced | |
| 626 // in a later Chrome version. | |
| 627 void FixMissingPrefs(const ExtensionIdList& extension_ids); | |
| 628 | |
| 629 // Installs the persistent extension preferences into |prefs_|'s extension | 625 // Installs the persistent extension preferences into |prefs_|'s extension |
| 630 // pref store. Does nothing if extensions_disabled_ is true. | 626 // pref store. Does nothing if extensions_disabled_ is true. |
| 631 void InitPrefStore(); | 627 void InitPrefStore(); |
| 632 | 628 |
| 633 // Checks whether there is a state pref for the extension and if so, whether | 629 // Checks whether there is a state pref for the extension and if so, whether |
| 634 // it matches |check_state|. | 630 // it matches |check_state|. |
| 635 bool DoesExtensionHaveState(const std::string& id, | 631 bool DoesExtensionHaveState(const std::string& id, |
| 636 Extension::State check_state) const; | 632 Extension::State check_state) const; |
| 637 | 633 |
| 638 // Reads the list of strings for |pref| from user prefs into | 634 // Reads the list of strings for |pref| from user prefs into |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 bool extensions_disabled_; | 686 bool extensions_disabled_; |
| 691 | 687 |
| 692 base::ObserverList<ExtensionPrefsObserver> observer_list_; | 688 base::ObserverList<ExtensionPrefsObserver> observer_list_; |
| 693 | 689 |
| 694 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 690 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 695 }; | 691 }; |
| 696 | 692 |
| 697 } // namespace extensions | 693 } // namespace extensions |
| 698 | 694 |
| 699 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 695 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| OLD | NEW |