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

Side by Side Diff: chrome/browser/profiles/profile.h

Issue 612323010: Align base::hash_map with C++11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try a different tack for C++ insanity Created 6 years, 2 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 // This class gathers state related to a single user profile. 5 // This class gathers state related to a single user profile.
6 6
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_
8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 int accessibility_pause_level_; 398 int accessibility_pause_level_;
399 399
400 DISALLOW_COPY_AND_ASSIGN(Profile); 400 DISALLOW_COPY_AND_ASSIGN(Profile);
401 }; 401 };
402 402
403 // The comparator for profile pointers as key in a map. 403 // The comparator for profile pointers as key in a map.
404 struct ProfileCompare { 404 struct ProfileCompare {
405 bool operator()(Profile* a, Profile* b) const; 405 bool operator()(Profile* a, Profile* b) const;
406 }; 406 };
407 407
408 #if defined(COMPILER_GCC)
409 namespace BASE_HASH_NAMESPACE {
410
411 template<>
412 struct hash<Profile*> {
413 std::size_t operator()(Profile* const& p) const {
414 return reinterpret_cast<std::size_t>(p);
415 }
416 };
417
418 } // namespace BASE_HASH_NAMESPACE
419 #endif
420
421 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ 408 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698