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

Unified Diff: chromeos/cryptohome/cryptohome_parameters.h

Issue 554043003: cros: Create cryptohome keys for Easy sign-in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: support multiple get key op, create key first then trim extra, lazily create manager Created 6 years, 3 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 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);
+ void SetBytes(const std::string& bytes);
+
+ std::string name;
+ bool has_number;
+ int64 number;
+ bool has_bytes;
+ std::string bytes;
+};
+
// 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.

Powered by Google App Engine
This is Rietveld 408576698