Chromium Code Reviews| Index: chromeos/cryptohome/cryptohome_parameters.h |
| diff --git a/chromeos/cryptohome/cryptohome_parameters.h b/chromeos/cryptohome/cryptohome_parameters.h |
| index 3738b56bce8870607b828197b32cfd6552119f30..1b2752dd49f2b951f29b38a4366fdc852e8ee3a3 100644 |
| --- a/chromeos/cryptohome/cryptohome_parameters.h |
| +++ b/chromeos/cryptohome/cryptohome_parameters.h |
| @@ -13,6 +13,8 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "chromeos/chromeos_export.h" |
| +class AccountId; |
| + |
| namespace cryptohome { |
| enum AuthKeyPrivileges { |
| @@ -25,12 +27,21 @@ enum AuthKeyPrivileges { |
| }; |
| // Identification of the user calling cryptohome method. |
| -struct CHROMEOS_EXPORT Identification { |
| - explicit Identification(const std::string& user_id); |
| +class CHROMEOS_EXPORT Identification { |
| + public: |
| + explicit Identification(const AccountId& account_id); |
| bool operator==(const Identification& other) const; |
| - std::string user_id; |
| + // This method should be used for migration purpose only. |
| + static Identification FromString(const std::string& id); |
| + |
| + const std::string& id() const { return id_; } |
| + |
| + private: |
| + explicit Identification(const std::string&); |
| + |
| + std::string id_; |
| }; |
|
xiyuan
2016/02/17 23:14:26
DISALLOW_COPY_AND_ASSIGN() ?
Alexander Alekseev
2016/02/18 13:45:14
It is copied and used in PostTask in several place
|
| // Definition of the key (e.g. password) for the cryptohome. |