chromeos-base/protofiles: Bring in StartUpFlags adjustments.
This CL brings in the changes made on the browser side as per
crrev.com/c/2565637. The change is applied via a patch file as opposed
to a proper uprev due to the latter being blocked on
crbug.com/1116244. This CL unblocks landing of subsequent code
changes, once the next proper uprev happens the patch should be
dropped again.
BUG=chromium:1073940
TEST=Compiles and passes tests.
Cq-Depend: chromium:2560128
Change-Id: Ia20c5f70fbd7f7ba1cc77e0bdf544b30022563bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2593204
Tested-by: Mattias Nissler <mnissler@chromium.org>
Commit-Queue: Mattias Nissler <mnissler@chromium.org>
Reviewed-by: Pavol Marko <pmarko@chromium.org>
Reviewed-by: Allen Webb <allenwebb@google.com>
diff --git a/chromeos-base/protofiles/files/protofiles-start-up-flags.patch b/chromeos-base/protofiles/files/protofiles-start-up-flags.patch
new file mode 100644
index 0000000..cc589c1
--- /dev/null
+++ b/chromeos-base/protofiles/files/protofiles-start-up-flags.patch
@@ -0,0 +1,50 @@
+This patch contains the device settings proto changes that were introduced in
+the chromium repo per crrev.com/c/2565637. We unfortunately can't roll
+protofiles right now due new dependencies that the browser side has introduced
+which aren't available on the Chrome OS side yet (see crbug.com/1116244). This
+patch is a temporary stop gap solution to allow work that depends on the proto
+changes to land. Once protofiles can be properly upreved again, the patch is no
+longer needed and should be dropped.
+
+--- a/cloud/policy/proto/chrome_device_policy.proto
++++ b/cloud/policy/proto/chrome_device_policy.proto
+@@ -552,11 +552,25 @@ message AllowRedeemChromeOsRegistrationOffersProto {
+ optional bool allow_redeem_offers = 1 [default = true];
+ }
+
+-message StartUpFlagsProto {
+- // Specifies the flags that should be applied to Google Chrome when it starts.
+- // The specified flags are applied on the login screen only. Flags set via
+- // this policy do not propagate into user sessions.
+- repeated string flags = 1;
++message FeatureFlagsProto {
++ // Specifies switches that should be passed to Google Chrome when it starts.
++ // The specified switches are applied on the login screen only. Switches set
++ // via this policy do not propagate into user sessions.
++ // This is deprecated because it turned out that storing raw switches is
++ // problematic since Chrome can't easily tie switches back to feature flags to
++ // validate them. The |feature_flags| field below works in terms of feature
++ // flag names (i.e. chrome://flags items) instead and supersedes |switches|.
++ repeated string switches = 1 [deprecated = true];
++
++ // Specifies feature flags (i.e. chrome://flags items) that should be enabled
++ // when Chrome starts. The format of the individual entries matches the format
++ // chrome://flags uses for internal bookkeeping, i.e. either the flag name as
++ // listed on chrome://flags (for flags that only have a single choice besides
++ // the default) or the flag name followed by the index of the chosen option,
++ // separated by an '@' character (for flags with multiple choices). The
++ // specified feature flags are applied on the login screen only and don't
++ // propagate into the user session.
++ repeated string feature_flags = 2;
+ }
+
+ message UptimeLimitProto {
+@@ -1763,7 +1777,7 @@ message ChromeDeviceSettingsProto {
+ optional SystemTimezoneProto system_timezone = 20;
+ optional DeviceLocalAccountsProto device_local_accounts = 21;
+ optional AllowRedeemChromeOsRegistrationOffersProto allow_redeem_offers = 22;
+- optional StartUpFlagsProto start_up_flags = 23;
++ optional FeatureFlagsProto feature_flags = 23;
+ optional UptimeLimitProto uptime_limit = 24;
+ optional VariationsParameterProto variations_parameter = 25;
+ optional AttestationSettingsProto attestation_settings = 26;
diff --git a/chromeos-base/protofiles/protofiles-0.0.41.ebuild b/chromeos-base/protofiles/protofiles-0.0.42.ebuild
similarity index 98%
rename from chromeos-base/protofiles/protofiles-0.0.41.ebuild
rename to chromeos-base/protofiles/protofiles-0.0.42.ebuild
index 173a2be..732a549 100644
--- a/chromeos-base/protofiles/protofiles-0.0.41.ebuild
+++ b/chromeos-base/protofiles/protofiles-0.0.42.ebuild
@@ -10,7 +10,7 @@
# then they should be done in the Chromium repository, and the commits below
# should be updated.
-EAPI="5"
+EAPI="7"
# We don't need the history at all.
EGIT_CLONE_TYPE="shallow"
@@ -54,6 +54,10 @@
KEYWORDS="*"
IUSE=""
+PATCHES=(
+ "${FILESDIR}/${PN}-start-up-flags.patch"
+)
+
POLICY_DIR="${S}/cloud/policy"
# A list of the static protobuf files that exist in Chromium.