Commit 4bfdf3ec authored by Sorin Jianu's avatar Sorin Jianu Committed by Commit Bot

Separate updater name and version in Component Updater.

Bug: 832230
Change-Id: I31ee1843106eb158e5422a86941832e0f0e45fe7
Reviewed-on: https://chromium-review.googlesource.com/1011598
Commit-Queue: Sorin Jianu <sorin@chromium.org>
Reviewed-by: default avatarJoshua Pawlicki <waffles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552866}
parent 999ea94e
......@@ -232,11 +232,11 @@ std::string BuildProtocolRequest(
// Chrome version and platform information.
base::StringAppendF(&request,
"version=\"%s-%s\" prodversion=\"%s\" "
"updater=\"%s\" updaterversion=\"%s\" prodversion=\"%s\" "
"lang=\"%s\" updaterchannel=\"%s\" prodchannel=\"%s\" "
"os=\"%s\" arch=\"%s\" nacl_arch=\"%s\"",
prod_id.c_str(), // "version" is prefixed by prod_id.
browser_version.c_str(),
prod_id.c_str(), // "updater"
browser_version.c_str(), // "updaterversion"
browser_version.c_str(), // "prodversion"
lang.c_str(), // "lang"
channel.c_str(), // "updaterchannel"
......
......@@ -28,7 +28,8 @@ TEST(BuildProtocolRequest, SessionIdProdIdVersion) {
string::npos,
request.find(" sessionid=\"{15160585-8ADE-4D3C-839B-1281A6035D1F}\" "));
EXPECT_NE(string::npos,
request.find(" version=\"some_prod_id-1.0\" prodversion=\"1.0\" "));
request.find(" updater=\"some_prod_id\" updaterversion=\"1.0\" "
"prodversion=\"1.0\" "));
}
TEST(BuildProtocolRequest, DownloadPreference) {
......
......@@ -270,10 +270,10 @@ TEST_P(UpdateCheckerTest, UpdateCheckSuccess) {
EXPECT_NE(string::npos, request.find("<hw physmemory="));
// Tests that the progid is injected correctly from the configurator.
EXPECT_NE(
string::npos,
request.find(" version=\"fake_prodid-30.0\" prodversion=\"30.0\" "));
// Tests that the product id is injected correctly from the configurator.
EXPECT_NE(string::npos,
request.find(" updater=\"fake_prodid\" updaterversion=\"30.0\" "
"prodversion=\"30.0\" "));
// Tests that there is a sessionid attribute.
EXPECT_NE(string::npos, request.find(" sessionid="));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment