update_engine: clean up depreacated values in omaha response
There are a few depreacated values that still exist only in the unittests which
needs complete depreacation: These are include:
- needsadmin
- ChromeOSVersion
- IsDelta
Also replace sample_omaha_v3_response.xml with a newer sample.
BUG=none
TEST=unittests pass
Change-Id: If22e08dd350faf700898af9a86876628ed00f1a5
Reviewed-on: https://chromium-review.googlesource.com/1238989
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Sen Jiang <senj@chromium.org>
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 5b00238..4d412ac 100644
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -146,19 +146,16 @@
: "") +
"</packages>"
"<actions><action event=\"postinstall\" MetadataSize=\"11" +
- (multi_package ? ":22" : "") + "\" ChromeOSVersion=\"" + version +
- "\" MoreInfo=\"" + more_info_url + "\" Prompt=\"" + prompt +
+ (multi_package ? ":22" : "") + "\" MoreInfo=\"" + more_info_url +
+ "\" Prompt=\"" + prompt +
"\" "
- "IsDelta=\"true\" "
"IsDeltaPayload=\"true" +
(multi_package ? ":false" : "") +
"\" "
"MaxDaysToScatter=\"" +
max_days_to_scatter +
"\" "
- "sha256=\"not-used\" "
- "needsadmin=\"" +
- needsadmin + "\" " +
+ "sha256=\"not-used\" " +
(deadline.empty() ? "" : ("deadline=\"" + deadline + "\" ")) +
(disable_p2p_for_downloading ? "DisableP2PForDownloading=\"true\" "
: "") +
@@ -201,7 +198,6 @@
string codebase2 = "http://code/base/2/";
string filename = "file.signed";
string hash = "4841534831323334";
- string needsadmin = "false";
uint64_t size = 123;
string deadline = "";
string max_days_to_scatter = "7";
@@ -1642,12 +1638,9 @@
"<packages><package hash=\"not-used\" name=\"f\" "
"size=\"587\" hash_sha256=\"lkq34j5345\"/></packages>"
"<actions><action event=\"postinstall\" "
- "ChromeOSVersion=\"10.2.3.4\" "
"Prompt=\"false\" "
- "IsDelta=\"true\" "
"IsDeltaPayload=\"false\" "
"sha256=\"not-used\" "
- "needsadmin=\"true\" "
"/></actions></manifest></updatecheck></app></response>";
LOG(INFO) << "Input Response = " << input_response;
diff --git a/sample_omaha_v3_response.xml b/sample_omaha_v3_response.xml
index abba523..1aec1f2 100644
--- a/sample_omaha_v3_response.xml
+++ b/sample_omaha_v3_response.xml
@@ -1,18 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
<response protocol="3.0" server="prod">
- <daystart elapsed_seconds="56652"/>
- <app appid="{90f229ce-83e2-4faf-8479-e368a34938b1}" status="ok">
+ <daystart elapsed_days="4086" elapsed_seconds="62499"/>
+ <app appid="{C166AF52-7EE9-4F08-AAA7-B4B895A9F336}" cohort="1:3:" cohortname="caroline_beta" status="ok">
+ <ping status="ok"/>
<updatecheck status="ok">
<urls>
- <url codebase="https://storage.googleapis.com/chromeos-releases-public/canary-channel/canary-channel/3095.0.0/"/>
+ <url codebase="http://dl.google.com/chromeos/caroline/10323.52.0/beta-channel/"/>
+ <url codebase="https://dl.google.com/chromeos/caroline/10323.52.0/beta-channel/"/>
</urls>
- <manifest version="3095.0.0">
- <packages>
- <package hash="HVOmp67vBjPdvpWmOC2Uw4UDwsc=" name="chromeos_3095.0.0_x86-zgb_canary-channel_full_mp-v2.bin-df37843370ddf1e3819a2afeaa934faa.signed" required="true" size="400752559"/>
- </packages>
+ <manifest version="10323.52.0">
<actions>
- <action event="update" run="chromeos_3095.0.0_x86-zgb_canary-channel_full_mp-v2.bin-df37843370ddf1e3819a2afeaa934faa.signed"/>
- <action ChromeOSVersion="3095.0.0" ChromeVersion="24.0.1307.0" IsDelta="true" IsDeltaPayload="false" MaxDaysToScatter="14" MetadataSignatureRsa="xXrO/LahHlKk3YmqEf1qE0PN587Sc2IJV+FN7J7x1h49waNQIy/QwYO4LaOySgETe5JZXtkAEzzqakfJwxQ2pVfzj1GkExwjd5LTn1He2GvA73B8fKbS4bfP7dbUFwD5039xCwf1U2gezFViOiOPiVURx/pEsdhv+Cqx/3HbjIuj5au2dooSyDxLC5AnODzAKyYfAcjMuiLON+9SqmctJW+VjzdY9SbJAnkH2qqVjFyBKAXsYT+hOTIJ3MJpg8OSVxMMtGB99PxbOJ52F37d2Y5Fws/AUkNnNEsan/WRJA1kuWoS6rpeR8JQYuVhLiK2u/KpOcvMVRw3Q2VUxtcAGw==" MetadataSize="58315" event="postinstall" sha256="DIAVxoI+8NpsudUawOA5U92VHlaxQBS3ejN4EPM6T2A="/>
+ <action event="update" run="chromeos_10323.46.0-10323.52.0_caroline_beta-channel_delta_mp.bin-f5c4e5e263c4c119d7d22e0f18a586e5.signed"/>
+ <action ChromeOSVersion="10323.52.0" ChromeVersion="65.0.3325.148" IsDelta="true" IsDeltaPayload="true" MaxDaysToScatter="14" MetadataSignatureRsa="tkrOiIQn2GMQzjLckjiiOyuyV+RqupNW50t6JlFWOhAzWM8dm1qrJVYTYlULxTVlx4BHijbNuX7+OYk6zhRuxuceY7sUwrCM2yxERZ/sDLA5wF0u/8KLP7qrDKL2OIk9JJhF0EdLPylUAEt6vWW4pbYRFhK0girgWIPSdqdjkfHNTKWEUtcQ3iAAB8AvLNOyGP/en0makFvSVXZ8Mq95UrSwWMYFdVmWdVkyRtLYSwLaz5J45y3DQuk3YjeaHhRlH/AQ3OJXX6rjTCwgyiddAccOalwFVwrczq6AUs5S+/vWAMqi+7YfCPgjRdPPIhRJVKcIiAPb8RNXlP+rigGwew==" MetadataSize="414487" event="postinstall" sha256="kONiEAWQV7UyBjOoFBcKDz0OkUx0yRuIGzse4O6rmDs="/>
</actions>
+ <packages>
+ <package fp="1.90e36210059057b5320633a814170a0f3d0e914c74c91b881b3b1ee0eeab983b" hash="gD1W+dPZiNEhz3f3odCtfL81Yi8=" hash_sha256="90e36210059057b5320633a814170a0f3d0e914c74c91b881b3b1ee0eeab983b" name="chromeos_10323.46.0-10323.52.0_caroline_beta-channel_delta_mp.bin-f5c4e5e263c4c119d7d22e0f18a586e5.signed" required="true" size="29981022"/>
+ </packages>
</manifest>
</updatecheck>
</app>