From 4c11728168db2bcc81575b080e66bcecb6e58067 Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Wed, 5 Jul 2023 14:10:14 +0200 Subject: [PATCH] Remove unused prompt attribute The prompt attribute is like MoreInfo Mac-specific and not used by Flatcar (see https://github.com/google/omaha/blob/main/doc/ServerProtocolV2.md). Remove the unused prompt attribute (on Mac it was there to display a prompt UI before installing an update). --- src/update_engine/omaha_request_action.cc | 3 +-- src/update_engine/omaha_request_action_unittest.cc | 11 ----------- src/update_engine/omaha_response.h | 2 -- .../omaha_response_handler_action_unittest.cc | 3 --- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/update_engine/omaha_request_action.cc b/src/update_engine/omaha_request_action.cc index 7af3d47..5a3cb83 100644 --- a/src/update_engine/omaha_request_action.cc +++ b/src/update_engine/omaha_request_action.cc @@ -41,8 +41,8 @@ static const char* kTagMaxFailureCountPerUrl = "MaxFailureCountPerUrl"; // Deprecated: "MetadataSize" // Deprecated: "MoreInfo"; See https://github.com/google/omaha/blob/main/doc/ServerProtocolV2.md // "And on the Mac, the Google Software Update Agent supports the following optional attributes": Prompt, MoreInfo +// Deprecated: "Prompt" static const char* kTagNeedsAdmin = "needsadmin"; -static const char* kTagPrompt = "Prompt"; static const char* kTagSha256 = "sha256"; namespace { @@ -593,7 +593,6 @@ bool OmahaRequestAction::ParseParams(xmlDoc* doc, // Get the optional properties one by one. output_object->needs_admin = XmlGetProperty(pie_action_node, kTagNeedsAdmin) == "true"; - output_object->prompt = XmlGetProperty(pie_action_node, kTagPrompt) == "true"; string max = XmlGetProperty(pie_action_node, kTagMaxFailureCountPerUrl); if (!strings::StringToUint(max, &output_object->max_failure_count_per_url)) diff --git a/src/update_engine/omaha_request_action_unittest.cc b/src/update_engine/omaha_request_action_unittest.cc index 43d3c50..de4e926 100644 --- a/src/update_engine/omaha_request_action_unittest.cc +++ b/src/update_engine/omaha_request_action_unittest.cc @@ -69,7 +69,6 @@ string GetNoUpdateResponse(const string& app_id) { string GetUpdateResponse2(const string& app_id, const string& display_version, - const string& prompt, const string& codebase, const string& filename, const string& hash, @@ -86,7 +85,6 @@ string GetUpdateResponse2(const string& app_id, "" "" "" "