OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 COMPONENTS_PREFS_PREF_VALUE_STORE_H_ | 5 #ifndef COMPONENTS_PREFS_PREF_VALUE_STORE_H_ |
6 #define COMPONENTS_PREFS_PREF_VALUE_STORE_H_ | 6 #define COMPONENTS_PREFS_PREF_VALUE_STORE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
| 10 #include <type_traits> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/callback.h" | 13 #include "base/callback.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
15 #include "base/values.h" | 16 #include "base/values.h" |
16 #include "components/prefs/base_prefs_export.h" | 17 #include "components/prefs/base_prefs_export.h" |
17 #include "components/prefs/pref_store.h" | 18 #include "components/prefs/pref_store.h" |
18 | 19 |
19 class PrefNotifier; | 20 class PrefNotifier; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 257 |
257 DISALLOW_COPY_AND_ASSIGN(PrefValueStore); | 258 DISALLOW_COPY_AND_ASSIGN(PrefValueStore); |
258 }; | 259 }; |
259 | 260 |
260 namespace std { | 261 namespace std { |
261 | 262 |
262 template <> | 263 template <> |
263 struct hash<PrefValueStore::PrefStoreType> { | 264 struct hash<PrefValueStore::PrefStoreType> { |
264 size_t operator()(PrefValueStore::PrefStoreType type) const { | 265 size_t operator()(PrefValueStore::PrefStoreType type) const { |
265 return std::hash< | 266 return std::hash< |
266 base::underlying_type<PrefValueStore::PrefStoreType>::type>()(type); | 267 std::underlying_type<PrefValueStore::PrefStoreType>::type>()(type); |
267 } | 268 } |
268 }; | 269 }; |
269 | 270 |
270 } // namespace std | 271 } // namespace std |
271 | 272 |
272 #endif // COMPONENTS_PREFS_PREF_VALUE_STORE_H_ | 273 #endif // COMPONENTS_PREFS_PREF_VALUE_STORE_H_ |
OLD | NEW |