| 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 // 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 Loading... |
| 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_ |
| OLD | NEW |