system_api: Use PURPOSE as a common prefix on the prepare enum values
Generally since all the enum values go into the top-level namespace,
it's usually considered best practice to have some sort of common prefix
to minimize the chance of collisions.
Just sending a quick fix for this now, before these names really go into
active use and it's harder to change. A quick search of the cros and
chrome codebases found no existing references to the symbols.
BUG=b:244237788
TEST=emerge-$BOARD chromeos-base/system_api cryptohome
Change-Id: Id02b54b41fb47c7cb6b970688a05060b281788aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/3895293
Tested-by: John Admanski <jadmanski@chromium.org>
Reviewed-by: Hardik Goyal <hardikgoyal@chromium.org>
Commit-Queue: John Admanski <jadmanski@chromium.org>
diff --git a/system_api/dbus/cryptohome/auth_factor.proto b/system_api/dbus/cryptohome/auth_factor.proto
index 25dea98..6e0f66e 100644
--- a/system_api/dbus/cryptohome/auth_factor.proto
+++ b/system_api/dbus/cryptohome/auth_factor.proto
@@ -31,10 +31,10 @@
PURPOSE_UNSPECIFIED = 0;
// For adding a new auth factor. Usually it indicates PrepareAsynAuthFactor()
// runs an auth factor enrollment process (based on user input collection).
- ADD_AUTH_FACTOR = 1;
+ PURPOSE_ADD_AUTH_FACTOR = 1;
// For authenticating an existing async auth factor. Usually this indicates
// PrepareAsyncAuthFactor() runs an user input collection process.
- AUTHENTICATE_AUTH_FACTOR = 2;
+ PURPOSE_AUTHENTICATE_AUTH_FACTOR = 2;
}
// Cryptographic signature algorithm type for smart card requests. Used with