| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SIGNIN_CORE_ACCOUNT_ID_ACCOUNT_ID_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_ACCOUNT_ID_ACCOUNT_ID_H_ |
| 6 #define COMPONENTS_SIGNIN_CORE_ACCOUNT_ID_ACCOUNT_ID_H_ | 6 #define COMPONENTS_SIGNIN_CORE_ACCOUNT_ID_ACCOUNT_ID_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 #include "base/containers/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
| 10 | 12 |
| 11 // Type that contains enough information to identify user. | 13 // Type that contains enough information to identify user. |
| 12 // | 14 // |
| 13 // TODO (alemate): we are in the process of moving away from std::string as a | 15 // TODO (alemate): we are in the process of moving away from std::string as a |
| 14 // type for storing user identifier to AccountId. At this time GaiaId is mostly | 16 // type for storing user identifier to AccountId. At this time GaiaId is mostly |
| 15 // empty, so this type is used as a replacement for e-mail string. | 17 // empty, so this type is used as a replacement for e-mail string. |
| 16 // But in near future AccountId will become full feature user identifier. | 18 // But in near future AccountId will become full feature user identifier. |
| 17 class AccountId { | 19 class AccountId { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 70 |
| 69 // Implement hashing of AccountId, so it can be used as a key in STL containers. | 71 // Implement hashing of AccountId, so it can be used as a key in STL containers. |
| 70 template <> | 72 template <> |
| 71 struct hash<AccountId> { | 73 struct hash<AccountId> { |
| 72 std::size_t operator()(const AccountId& user_id) const; | 74 std::size_t operator()(const AccountId& user_id) const; |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 } // namespace BASE_HASH_NAMESPACE | 77 } // namespace BASE_HASH_NAMESPACE |
| 76 | 78 |
| 77 #endif // COMPONENTS_SIGNIN_CORE_ACCOUNT_ID_ACCOUNT_ID_H_ | 79 #endif // COMPONENTS_SIGNIN_CORE_ACCOUNT_ID_ACCOUNT_ID_H_ |
| OLD | NEW |