update_client: remove dead system requirements code.
This was only used by offline manifests, which no longer rely on this module. Bug: 353249967 Change-Id: If82b5ff95fd24fefb066fae9c384dbabc77889d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6196810 Auto-Submit: Joshua Pawlicki <waffles@chromium.org> Reviewed-by: Sorin Jianu <sorin@chromium.org> Commit-Queue: Sorin Jianu <sorin@chromium.org> Cr-Commit-Position: refs/heads/main@{#1411114}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
e6d7d779ce
commit
84348fcac9
components/update_client
docs/updater
@ -122,24 +122,6 @@ class ProtocolParser {
|
||||
std::vector<Data> data;
|
||||
};
|
||||
|
||||
struct SystemRequirements {
|
||||
std::string platform; // For example, "win".
|
||||
|
||||
// Expected host processor architecture that the app is compatible with.
|
||||
// `arch` can be a single entry, or multiple entries separated with `,`.
|
||||
// Entries prefixed with a `-` (negative entries) indicate non-compatible
|
||||
// hosts.
|
||||
//
|
||||
// Examples:
|
||||
// * `arch` == "x86".
|
||||
// * `arch` == "x64".
|
||||
// * `arch` == "x86,x64,-arm64": the app will fail installation if the
|
||||
// underlying host is arm64.
|
||||
std::string arch;
|
||||
|
||||
std::string min_os_version; // major.minor.
|
||||
};
|
||||
|
||||
static constexpr int kNoDaystart = -1;
|
||||
struct Results {
|
||||
Results();
|
||||
@ -152,7 +134,6 @@ class ProtocolParser {
|
||||
// This will be >= 0, or kNoDaystart if the <daystart> tag was not present.
|
||||
int daystart_elapsed_days = kNoDaystart;
|
||||
|
||||
SystemRequirements system_requirements;
|
||||
std::vector<Result> list;
|
||||
};
|
||||
|
||||
|
@ -376,25 +376,6 @@ bool ProtocolParserJSON::DoParse(const std::string& response_json,
|
||||
}
|
||||
}
|
||||
|
||||
const base::Value::Dict* systemrequirements_node =
|
||||
response_node->FindDict("systemrequirements");
|
||||
if (systemrequirements_node) {
|
||||
const std::string* platform =
|
||||
systemrequirements_node->FindString("platform");
|
||||
if (platform) {
|
||||
results->system_requirements.platform = *platform;
|
||||
}
|
||||
const std::string* arch = systemrequirements_node->FindString("arch");
|
||||
if (arch) {
|
||||
results->system_requirements.arch = *arch;
|
||||
}
|
||||
const std::string* min_os_version =
|
||||
systemrequirements_node->FindString("min_os_version");
|
||||
if (min_os_version) {
|
||||
results->system_requirements.min_os_version = *min_os_version;
|
||||
}
|
||||
}
|
||||
|
||||
const base::Value::List* app_node = response_node->FindList("app");
|
||||
if (app_node) {
|
||||
for (const auto& app : *app_node) {
|
||||
|
@ -13,9 +13,6 @@ namespace update_client {
|
||||
const char* kJSONValid = R"()]}'
|
||||
{"response":{
|
||||
"protocol":"3.1",
|
||||
"systemrequirements":{"platform":"win",
|
||||
"arch":"x64",
|
||||
"min_os_version":"6.1"},
|
||||
"app":[
|
||||
{"appid":"12345",
|
||||
"status":"ok",
|
||||
@ -456,9 +453,6 @@ TEST(UpdateClientProtocolParserJSONTest, Parse) {
|
||||
// Parse some valid XML, and check that all params came out as expected.
|
||||
EXPECT_TRUE(parser->Parse(kJSONValid));
|
||||
EXPECT_TRUE(parser->errors().empty());
|
||||
EXPECT_EQ(parser->results().system_requirements.platform, "win");
|
||||
EXPECT_EQ(parser->results().system_requirements.arch, "x64");
|
||||
EXPECT_EQ(parser->results().system_requirements.min_os_version, "6.1");
|
||||
EXPECT_EQ(1u, parser->results().list.size());
|
||||
const auto* first_result = &parser->results().list[0];
|
||||
EXPECT_STREQ("ok", first_result->status.c_str());
|
||||
|
@ -576,8 +576,6 @@ object in the update check request.
|
||||
* `app`: A list of `app` objects. There is one object for each `app` in the
|
||||
request body.
|
||||
* `daystart`: A `daystart` object.
|
||||
* `systemrequirements`: A `systemrequirements` object. The server will not
|
||||
send this element, but it may be present in offline installer manifests.
|
||||
* `protocol`: The version of the Omaha protocol. Servers responding with this
|
||||
protocol must send a value of "4.0".
|
||||
* `server`: A string identifying the server or server family for diagnostic
|
||||
@ -592,47 +590,6 @@ server's locale. It has the following members:
|
||||
in future update checks (for examples, see `request.app.ping.rd` and
|
||||
`request.app.installdate`).
|
||||
|
||||
#### `systemrequirements` Objects (Update Check Response)
|
||||
A `systemrequirements` object contains information about the operating system
|
||||
that the application requires to install. It has the following members:
|
||||
* `platform`: The operating system family that the application requires
|
||||
(e.g. "win", "mac", "linux", "ios", "android"), or "" if not applicable.
|
||||
* `arch`: Expected host processor architecture that the app is compatible
|
||||
with, or "" if not applicable.
|
||||
|
||||
`arch` can be a single entry, or multiple entries separated with `,`.
|
||||
Entries prefixed with a `-` (negative entries) indicate non-compatible
|
||||
hosts. Non-prefixed entries indicate compatible guests.
|
||||
|
||||
An application is compatible with the current architecture if:
|
||||
* `arch` is empty, or
|
||||
* none of the negative entries within `arch` match the current host
|
||||
architecture exactly, and there are no non-negative entries, or
|
||||
* one of the non-negative entries within `arch` matches the current
|
||||
architecture, or is compatible with the current architecture (i.e., it is
|
||||
a compatible guest for the current host). The latter is determined by
|
||||
`::IsWow64GuestMachineSupported()` on Windows.
|
||||
* If `::IsWow64GuestMachineSupported()` is not available, returns `true`
|
||||
if `arch` is x86.
|
||||
|
||||
Examples:
|
||||
* `arch` == "x86".
|
||||
* `arch` == "x64".
|
||||
* `arch` == "x86,x64,-arm64": installation will fail if the underlying host
|
||||
is arm64.
|
||||
* `min_os_version`: The minimum required version of the operating system, or
|
||||
"" if not applicable.
|
||||
|
||||
The `min_os_version` is in the format `major.minor.build.patch` for
|
||||
Windows. The `major`, `minor` and `build` are the values returned by the
|
||||
`::GetVersionEx` API. The `patch` is the `UBR` value under the registry
|
||||
path `HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion`.
|
||||
|
||||
The `build` and the `patch` components may be omitted if all that is needed
|
||||
is a minimum `major.minor` version. For example, `6.0` will match all OS
|
||||
versions that are at or above that version, regardless of `build` and
|
||||
`patch` numbers.
|
||||
|
||||
#### `app` Objects (Update Check Response)
|
||||
An app object represents a per-application acknowledgement of the request. If an
|
||||
application appears in the request, it must have a corresponding acknowledgement
|
||||
|
Reference in New Issue
Block a user