Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Unified Diff: components/update_client/utils.cc

Issue 2340113002: Inject the prodid for the extensions and component updaters. (Closed)
Patch Set: Remove "chromium" as a possible value in comment. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/update_client/utils.h ('k') | components/update_client/utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/utils.cc
diff --git a/components/update_client/utils.cc b/components/update_client/utils.cc
index 717984d8999f26d96ea4dfb5ab59bc377b42af53..2eaed3bdf473698859e231c44e1dba44b07bd7f3 100644
--- a/components/update_client/utils.cc
+++ b/components/update_client/utils.cc
@@ -68,16 +68,14 @@ std::string HexStringToID(const std::string& hexstr) {
} // namespace
-std::string BuildProtocolRequest(const std::string& browser_version,
+std::string BuildProtocolRequest(const std::string& prod_id,
+ const std::string& browser_version,
const std::string& channel,
const std::string& lang,
const std::string& os_long_name,
const std::string& download_preference,
const std::string& request_body,
const std::string& additional_attributes) {
- const std::string prod_id(
- UpdateQueryParams::GetProdIdString(UpdateQueryParams::CHROME));
-
std::string request(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<request protocol=\"3.0\" ");
@@ -91,8 +89,8 @@ std::string BuildProtocolRequest(const std::string& browser_version,
"version=\"%s-%s\" prodversion=\"%s\" "
"requestid=\"{%s}\" lang=\"%s\" updaterchannel=\"%s\" prodchannel=\"%s\" "
"os=\"%s\" arch=\"%s\" nacl_arch=\"%s\"",
- prod_id.c_str(),
- browser_version.c_str(), // "version"
+ prod_id.c_str(), // "version" is prefixed by prod_id.
+ browser_version.c_str(),
browser_version.c_str(), // "prodversion"
base::GenerateGUID().c_str(), // "requestid"
lang.c_str(), // "lang",
« no previous file with comments | « components/update_client/utils.h ('k') | components/update_client/utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698