| 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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. | 633 // Migrates the permissions data in the pref store. |
| 634 void MigratePermissions(const ExtensionIdList& extension_ids); | 634 void MigratePermissions(const ExtensionIdList& extension_ids); |
| 635 | 635 |
| 636 // Migrates the disable reasons from a single enum to a bit mask. | |
| 637 void MigrateDisableReasons(const ExtensionIdList& extension_ids); | |
| 638 | |
| 639 // Checks whether there is a state pref for the extension and if so, whether | 636 // Checks whether there is a state pref for the extension and if so, whether |
| 640 // it matches |check_state|. | 637 // it matches |check_state|. |
| 641 bool DoesExtensionHaveState(const std::string& id, | 638 bool DoesExtensionHaveState(const std::string& id, |
| 642 Extension::State check_state) const; | 639 Extension::State check_state) const; |
| 643 | 640 |
| 644 // Reads the list of strings for |pref| from user prefs into | 641 // Reads the list of strings for |pref| from user prefs into |
| 645 // |id_container_out|. Returns false if the pref wasn't found in the user | 642 // |id_container_out|. Returns false if the pref wasn't found in the user |
| 646 // pref store. | 643 // pref store. |
| 647 template <class ExtensionIdContainer> | 644 template <class ExtensionIdContainer> |
| 648 bool GetUserExtensionPrefIntoContainer( | 645 bool GetUserExtensionPrefIntoContainer( |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 bool extensions_disabled_; | 693 bool extensions_disabled_; |
| 697 | 694 |
| 698 base::ObserverList<ExtensionPrefsObserver> observer_list_; | 695 base::ObserverList<ExtensionPrefsObserver> observer_list_; |
| 699 | 696 |
| 700 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 697 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 701 }; | 698 }; |
| 702 | 699 |
| 703 } // namespace extensions | 700 } // namespace extensions |
| 704 | 701 |
| 705 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 702 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| OLD | NEW |