updater: Allow arbitrary length for brand string in tag
This clarifies that the length of the brand string in the tag is arbitrary and not limited to 4 characters in length. Further normalization of the string value, if needed, can be done on the server. This avoids updater errors due to trivial configuration errors of the brand tag. No code changes are done, this has been the behavior of brand code in O4 since the beginning. Fixed: b/41490422 Change-Id: If1557a23f5f965f70e6c41942625d43ab19af7b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5278627 Commit-Queue: Sorin Jianu <sorin@chromium.org> Reviewed-by: Joshua Pawlicki <waffles@chromium.org> Commit-Queue: Joshua Pawlicki <waffles@chromium.org> Auto-Submit: Sorin Jianu <sorin@chromium.org> Cr-Commit-Position: refs/heads/main@{#1258202}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
205c36a5cb
commit
95c1afdcec
@ -51,10 +51,9 @@ constexpr base::StringPiece kTagArgUsageStats = "usagestats";
|
||||
// progress from the website to installation completion.
|
||||
constexpr base::StringPiece kTagArgInstallationId = "iid";
|
||||
|
||||
// The Brand Code used for branding.
|
||||
// If a brand value already exists on the system, it should be ignored.
|
||||
// This value is used to set the initial brand for the updater and the client
|
||||
// app.
|
||||
// The brand code used for branding. This value sets the initial brand for the
|
||||
// updater and the client app. If a brand value already exists on the system,
|
||||
// the new brand value is ignored.
|
||||
constexpr base::StringPiece kTagArgBrandCode = "brand";
|
||||
|
||||
// The Client ID used for branding.
|
||||
|
@ -820,6 +820,15 @@ TEST(TagParserTest, BrandCodeValid) {
|
||||
AppArgsBuilder("8617ee50-f91c-4dc1-b937-0969eef59b0b").Build())
|
||||
.WithBrandCode("GOOG")
|
||||
.Build());
|
||||
VerifyTagParseSuccess(
|
||||
"appguid=8617EE50-F91C-4DC1-B937-0969EEF59B0B&"
|
||||
"brand=GOOGLE",
|
||||
std::nullopt,
|
||||
TagArgsBuilder()
|
||||
.WithApp(
|
||||
AppArgsBuilder("8617ee50-f91c-4dc1-b937-0969eef59b0b").Build())
|
||||
.WithBrandCode("GOOGLE")
|
||||
.Build());
|
||||
}
|
||||
|
||||
TEST(TagParserTest, ClientIdValid) {
|
||||
|
@ -40,9 +40,12 @@ tags of the format `Gact2.0Omaha{tag}ahamO0.2tcaG`, but Chromium-branded and
|
||||
Google-branded builds assume the first case.
|
||||
|
||||
##### Brand code
|
||||
The brand code is a string of up to 4 characters long. The brand code is
|
||||
persisted during the first install of the app. Over-installs and updates do not
|
||||
modify the brand code.
|
||||
The brand code is a string of arbitrary length. The brand code is persisted
|
||||
during the first install of the app. Over-installs and updates do not modify
|
||||
the brand code.
|
||||
|
||||
Note: the limit used to be 4 characters in the previous implementation of the
|
||||
updater.
|
||||
|
||||
On macOS, the brand code (as well as AP parameter and the app version) can be
|
||||
specified using a path to a plist file and a key within that plist file. When
|
||||
|
Reference in New Issue
Block a user