Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: components/prefs/pref_value_store.h

Issue 2797793002: Remove base::underlying_type, replace uses with std::underlying_type (Closed)
Patch Set: underlyingtype: rm-tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « components/ntp_snippets/content_suggestions_metrics.cc ('k') | mojo/public/cpp/bindings/lib/bindings_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698