| 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 <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // value. | 110 // value. |
| 111 virtual T* Create(); | 111 virtual T* Create(); |
| 112 | 112 |
| 113 private: | 113 private: |
| 114 DictionaryPrefUpdate update_; | 114 DictionaryPrefUpdate update_; |
| 115 const std::string extension_id_; | 115 const std::string extension_id_; |
| 116 const std::string key_; | 116 const std::string key_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(ScopedUpdate); | 118 DISALLOW_COPY_AND_ASSIGN(ScopedUpdate); |
| 119 }; | 119 }; |
| 120 typedef ScopedUpdate<base::DictionaryValue, base::Value::TYPE_DICTIONARY> | 120 typedef ScopedUpdate<base::DictionaryValue, base::Value::Type::DICTIONARY> |
| 121 ScopedDictionaryUpdate; | 121 ScopedDictionaryUpdate; |
| 122 typedef ScopedUpdate<base::ListValue, base::Value::TYPE_LIST> | 122 typedef ScopedUpdate<base::ListValue, base::Value::Type::LIST> |
| 123 ScopedListUpdate; | 123 ScopedListUpdate; |
| 124 | 124 |
| 125 // Creates an ExtensionPrefs object. | 125 // Creates an ExtensionPrefs object. |
| 126 // Does not take ownership of |prefs| or |extension_pref_value_map|. | 126 // Does not take ownership of |prefs| or |extension_pref_value_map|. |
| 127 // If |extensions_disabled| is true, extension controlled preferences and | 127 // If |extensions_disabled| is true, extension controlled preferences and |
| 128 // content settings do not become effective. ExtensionPrefsObservers should be | 128 // content settings do not become effective. ExtensionPrefsObservers should be |
| 129 // included in |early_observers| if they need to observe events which occur | 129 // included in |early_observers| if they need to observe events which occur |
| 130 // during initialization of the ExtensionPrefs object. | 130 // during initialization of the ExtensionPrefs object. |
| 131 static ExtensionPrefs* Create( | 131 static ExtensionPrefs* Create( |
| 132 content::BrowserContext* browser_context, | 132 content::BrowserContext* browser_context, |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 bool extensions_disabled_; | 688 bool extensions_disabled_; |
| 689 | 689 |
| 690 base::ObserverList<ExtensionPrefsObserver> observer_list_; | 690 base::ObserverList<ExtensionPrefsObserver> observer_list_; |
| 691 | 691 |
| 692 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 692 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 693 }; | 693 }; |
| 694 | 694 |
| 695 } // namespace extensions | 695 } // namespace extensions |
| 696 | 696 |
| 697 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 697 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| OLD | NEW |