Chromium Code Reviews| 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> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 | 28 |
| 29 // empty() is deprecated. Use !is_valid() instead. | 29 // empty() is deprecated. Use !is_valid() instead. |
| 30 bool empty() const; | 30 bool empty() const; |
| 31 bool is_valid() const; | 31 bool is_valid() const; |
| 32 void clear(); | 32 void clear(); |
| 33 | 33 |
| 34 const std::string& GetAccountType() const; | 34 const std::string& GetAccountType() const; |
| 35 const std::string& GetGaiaId() const; | 35 const std::string& GetGaiaId() const; |
| 36 const std::string& GetUserEmail() const; | 36 const std::string& GetUserEmail() const; |
| 37 | 37 |
| 38 // This returns prefixed GaiaId string to be used as a storage key. | 38 // This returns prefixed GaiaId string to be used as a storage key. |
|
Roger Tawa OOO till Jul 10th
2016/10/26 18:32:20
This comment is misleading. Users of AccountId sh
Alexander Alekseev
2016/10/27 05:02:22
I was about to delay updating of comments to the f
| |
| 39 const std::string GetGaiaIdKey() const; | 39 const std::string GetAccountIdKey() const; |
| 40 | 40 |
| 41 void SetGaiaId(const std::string& gaia_id); | 41 void SetGaiaId(const std::string& gaia_id); |
| 42 void SetUserEmail(const std::string& email); | 42 void SetUserEmail(const std::string& email); |
| 43 | 43 |
| 44 // This method is to be used during transition period only. | 44 // This method is to be used during transition period only. |
| 45 static AccountId FromUserEmail(const std::string& user_email); | 45 static AccountId FromUserEmail(const std::string& user_email); |
| 46 // This method is to be used during transition period only. | 46 // This method is to be used during transition period only. |
| 47 static AccountId FromGaiaId(const std::string& gaia_id); | 47 static AccountId FromGaiaId(const std::string& gaia_id); |
| 48 // This method is the preferred way to construct AccountId if you have | 48 // This method is the preferred way to construct AccountId if you have |
| 49 // full account information. | 49 // full account information. |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 73 | 73 |
| 74 // Implement hashing of AccountId, so it can be used as a key in STL containers. | 74 // Implement hashing of AccountId, so it can be used as a key in STL containers. |
| 75 template <> | 75 template <> |
| 76 struct hash<AccountId> { | 76 struct hash<AccountId> { |
| 77 std::size_t operator()(const AccountId& user_id) const; | 77 std::size_t operator()(const AccountId& user_id) const; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace BASE_HASH_NAMESPACE | 80 } // namespace BASE_HASH_NAMESPACE |
| 81 | 81 |
| 82 #endif // COMPONENTS_SIGNIN_CORE_ACCOUNT_ID_ACCOUNT_ID_H_ | 82 #endif // COMPONENTS_SIGNIN_CORE_ACCOUNT_ID_ACCOUNT_ID_H_ |
| OLD | NEW |