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

Unified Diff: chromeos/cryptohome/cryptohome_parameters.h

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698