Commit 60647a0f authored by Markus Heintz's avatar Markus Heintz Committed by Commit Bot

[User Consent] Feature enums in UserConsentSpecifcis and UserEventSpecifics.Consent must match.

Bug: 867919
Change-Id: I3804c09877d8b1f44fadcd062a3930e76a4684c4
Reviewed-on: https://chromium-review.googlesource.com/1196445
Commit-Queue: Markus Heintz <markusheintz@chromium.org>
Reviewed-by: default avatarvitaliii <vitaliii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587554}
parent 0f0b1aeb
......@@ -299,7 +299,7 @@ const char* ProtoEnumToString(sync_pb::TabNavigation::PasswordState state) {
const char* ProtoEnumToString(sync_pb::UserConsentSpecifics::Feature feature) {
ASSERT_ENUM_BOUNDS(sync_pb::UserConsentSpecifics, Feature,
FEATURE_UNSPECIFIED, CHROME_UNIFIED_CONSENT);
FEATURE_UNSPECIFIED, ASSISTANT_ACTIVITY_CONTROL);
switch (feature) {
ENUM_CASE(sync_pb::UserConsentSpecifics, FEATURE_UNSPECIFIED);
ENUM_CASE(sync_pb::UserConsentSpecifics, CHROME_SYNC);
......@@ -307,6 +307,7 @@ const char* ProtoEnumToString(sync_pb::UserConsentSpecifics::Feature feature) {
ENUM_CASE(sync_pb::UserConsentSpecifics, BACKUP_AND_RESTORE);
ENUM_CASE(sync_pb::UserConsentSpecifics, GOOGLE_LOCATION_SERVICE);
ENUM_CASE(sync_pb::UserConsentSpecifics, CHROME_UNIFIED_CONSENT);
ENUM_CASE(sync_pb::UserConsentSpecifics, ASSISTANT_ACTIVITY_CONTROL);
}
NOTREACHED();
return "";
......
......@@ -92,6 +92,10 @@ message UserConsentSpecifics {
BACKUP_AND_RESTORE = 3;
GOOGLE_LOCATION_SERVICE = 4;
CHROME_UNIFIED_CONSENT = 5;
// TODO(markusheintz): ASSISTANT_ACTIVITY_CONTROL was only added for
// compatibility with the Feature enum in UserEventSpecifics.UserConsent.
// Delete this value once the value is deleted from the other proto.
ASSISTANT_ACTIVITY_CONTROL = 6;
}
optional Feature feature = 1 [deprecated = true];
// Ids of the strings of the consent text presented to the user.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment