OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_PREFS_PREF_VALUE_STORE_H_ | 5 #ifndef CHROME_BROWSER_PREFS_PREF_VALUE_STORE_H_ |
6 #define CHROME_BROWSER_PREFS_PREF_VALUE_STORE_H_ | 6 #define CHROME_BROWSER_PREFS_PREF_VALUE_STORE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // Takes ownership of |pref_store|. | 146 // Takes ownership of |pref_store|. |
147 void Initialize(PrefValueStore* store, | 147 void Initialize(PrefValueStore* store, |
148 PrefStore* pref_store, | 148 PrefStore* pref_store, |
149 PrefStoreType type); | 149 PrefStoreType type); |
150 | 150 |
151 PrefStore* store() { return pref_store_.get(); } | 151 PrefStore* store() { return pref_store_.get(); } |
152 const PrefStore* store() const { return pref_store_.get(); } | 152 const PrefStore* store() const { return pref_store_.get(); } |
153 | 153 |
154 private: | 154 private: |
155 // PrefStore::Observer implementation. | 155 // PrefStore::Observer implementation. |
156 virtual void OnPrefValueChanged(const std::string& key); | 156 virtual void OnPrefValueChanged(const std::string& key) OVERRIDE; |
157 virtual void OnInitializationCompleted(bool succeeded); | 157 virtual void OnInitializationCompleted(bool succeeded) OVERRIDE; |
158 | 158 |
159 // PrefValueStore this keeper is part of. | 159 // PrefValueStore this keeper is part of. |
160 PrefValueStore* pref_value_store_; | 160 PrefValueStore* pref_value_store_; |
161 | 161 |
162 // The PrefStore managed by this keeper. | 162 // The PrefStore managed by this keeper. |
163 scoped_refptr<PrefStore> pref_store_; | 163 scoped_refptr<PrefStore> pref_store_; |
164 | 164 |
165 // Type of the pref store. | 165 // Type of the pref store. |
166 PrefStoreType type_; | 166 PrefStoreType type_; |
167 | 167 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // A mapping of preference names to their registered types. | 246 // A mapping of preference names to their registered types. |
247 PrefTypeMap pref_types_; | 247 PrefTypeMap pref_types_; |
248 | 248 |
249 // True if not all of the PrefStores were initialized successfully. | 249 // True if not all of the PrefStores were initialized successfully. |
250 bool initialization_failed_; | 250 bool initialization_failed_; |
251 | 251 |
252 DISALLOW_COPY_AND_ASSIGN(PrefValueStore); | 252 DISALLOW_COPY_AND_ASSIGN(PrefValueStore); |
253 }; | 253 }; |
254 | 254 |
255 #endif // CHROME_BROWSER_PREFS_PREF_VALUE_STORE_H_ | 255 #endif // CHROME_BROWSER_PREFS_PREF_VALUE_STORE_H_ |
OLD | NEW |