| 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 DisableReasonChange change); | 623 DisableReasonChange change); |
| 624 | 624 |
| 625 // Fix missing preference entries in the extensions that are were introduced | 625 // Fix missing preference entries in the extensions that are were introduced |
| 626 // in a later Chrome version. | 626 // in a later Chrome version. |
| 627 void FixMissingPrefs(const ExtensionIdList& extension_ids); | 627 void FixMissingPrefs(const ExtensionIdList& extension_ids); |
| 628 | 628 |
| 629 // Installs the persistent extension preferences into |prefs_|'s extension | 629 // Installs the persistent extension preferences into |prefs_|'s extension |
| 630 // pref store. Does nothing if extensions_disabled_ is true. | 630 // pref store. Does nothing if extensions_disabled_ is true. |
| 631 void InitPrefStore(); | 631 void InitPrefStore(); |
| 632 | 632 |
| 633 // Migrates the permissions data in the pref store. | |
| 634 void MigratePermissions(const ExtensionIdList& extension_ids); | |
| 635 | |
| 636 // Checks whether there is a state pref for the extension and if so, whether | 633 // Checks whether there is a state pref for the extension and if so, whether |
| 637 // it matches |check_state|. | 634 // it matches |check_state|. |
| 638 bool DoesExtensionHaveState(const std::string& id, | 635 bool DoesExtensionHaveState(const std::string& id, |
| 639 Extension::State check_state) const; | 636 Extension::State check_state) const; |
| 640 | 637 |
| 641 // Reads the list of strings for |pref| from user prefs into | 638 // Reads the list of strings for |pref| from user prefs into |
| 642 // |id_container_out|. Returns false if the pref wasn't found in the user | 639 // |id_container_out|. Returns false if the pref wasn't found in the user |
| 643 // pref store. | 640 // pref store. |
| 644 template <class ExtensionIdContainer> | 641 template <class ExtensionIdContainer> |
| 645 bool GetUserExtensionPrefIntoContainer( | 642 bool GetUserExtensionPrefIntoContainer( |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 bool extensions_disabled_; | 690 bool extensions_disabled_; |
| 694 | 691 |
| 695 base::ObserverList<ExtensionPrefsObserver> observer_list_; | 692 base::ObserverList<ExtensionPrefsObserver> observer_list_; |
| 696 | 693 |
| 697 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 694 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 698 }; | 695 }; |
| 699 | 696 |
| 700 } // namespace extensions | 697 } // namespace extensions |
| 701 | 698 |
| 702 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 699 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| OLD | NEW |