Index: chromeos/cryptohome/cryptohome_parameters.h |
diff --git a/chromeos/cryptohome/cryptohome_parameters.h b/chromeos/cryptohome/cryptohome_parameters.h |
index fe43f2c21a8d05969c87c3d60db0348d512d6e55..e413bf795c40568872f4ec9017198e7fc776e92b 100644 |
--- a/chromeos/cryptohome/cryptohome_parameters.h |
+++ b/chromeos/cryptohome/cryptohome_parameters.h |
@@ -24,6 +24,23 @@ enum AuthKeyPrivileges { |
PRIV_DEFAULT = PRIV_MOUNT | PRIV_ADD | PRIV_REMOVE | PRIV_MIGRATE |
}; |
+// An entry in a cryptohome key provider data. |
+struct CHROMEOS_EXPORT ProviderDataEntry { |
+ explicit ProviderDataEntry(const std::string& name); |
+ ProviderDataEntry(const std::string& name, int64 number); |
+ ProviderDataEntry(const std::string& name, const std::string& bytes); |
+ ~ProviderDataEntry(); |
+ |
+ void SetNumber(int64 number); |
Darren Krahn
2014/09/12 16:35:17
style nit: mutators should match var name. E.g. se
xiyuan
2014/09/12 19:10:11
Code removed after rebasing.
|
+ void SetBytes(const std::string& bytes); |
+ |
+ std::string name; |
+ bool has_number; |
+ int64 number; |
+ bool has_bytes; |
+ std::string bytes; |
+}; |
+ |
Darren Krahn
2014/09/12 16:35:17
This collides with https://codereview.chromium.org
xiyuan
2014/09/12 19:10:11
Rebased.
|
// Identification of the user calling cryptohome method. |
struct CHROMEOS_EXPORT Identification { |
explicit Identification(const std::string& user_id); |
@@ -53,6 +70,7 @@ struct CHROMEOS_EXPORT KeyDefinition { |
std::string signature_key; |
// Privileges associated with key. Combination of |AuthKeyPrivileges| values. |
int privileges; |
+ std::vector<ProviderDataEntry> provider_data; |
}; |
// Authorization attempt data for user. |
@@ -77,15 +95,6 @@ struct CHROMEOS_EXPORT RetrievedKeyData { |
AUTHORIZATION_TYPE_AES256CBC_HMACSHA256 |
}; |
- struct ProviderData { |
- explicit ProviderData(const std::string& name); |
- ~ProviderData(); |
- |
- std::string name; |
- scoped_ptr<int64> number; |
- scoped_ptr<std::string> bytes; |
- }; |
- |
RetrievedKeyData(Type type, const std::string& label, int64 revision); |
~RetrievedKeyData(); |
@@ -95,7 +104,7 @@ struct CHROMEOS_EXPORT RetrievedKeyData { |
int privileges; |
int64 revision; |
std::vector<AuthorizationType> authorization_types; |
- ScopedVector<ProviderData> provider_data; |
+ std::vector<ProviderDataEntry> provider_data; |
}; |
// Parameters for Mount call. |