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

Side by Side Diff: components/update_client/protocol_builder.cc

Issue 2898243004: Announce to Omaha that Chrome accepts CRX₂ and CRX₃ files. (Closed)
Patch Set: Through #7 Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/update_client/update_query_params.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/update_client/protocol_builder.h" 5 #include "components/update_client/protocol_builder.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 const std::string& additional_attributes, 175 const std::string& additional_attributes,
176 const std::unique_ptr<UpdaterState::Attributes>& updater_state_attributes) { 176 const std::unique_ptr<UpdaterState::Attributes>& updater_state_attributes) {
177 std::string request = base::StringPrintf( 177 std::string request = base::StringPrintf(
178 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" 178 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
179 "<request protocol=\"%s\" ", 179 "<request protocol=\"%s\" ",
180 kProtocolVersion); 180 kProtocolVersion);
181 181
182 if (!additional_attributes.empty()) 182 if (!additional_attributes.empty())
183 base::StringAppendF(&request, "%s ", additional_attributes.c_str()); 183 base::StringAppendF(&request, "%s ", additional_attributes.c_str());
184 184
185 // Constant information for this updater.
186 base::StringAppendF(&request, "dedup=\"cr\" acceptformat=\"crx2,crx3\" ");
187
185 // Chrome version and platform information. 188 // Chrome version and platform information.
186 base::StringAppendF( 189 base::StringAppendF(
187 &request, 190 &request,
188 "version=\"%s-%s\" prodversion=\"%s\" " 191 "version=\"%s-%s\" prodversion=\"%s\" "
189 "requestid=\"{%s}\" lang=\"%s\" updaterchannel=\"%s\" prodchannel=\"%s\" " 192 "requestid=\"{%s}\" lang=\"%s\" updaterchannel=\"%s\" prodchannel=\"%s\" "
190 "os=\"%s\" arch=\"%s\" nacl_arch=\"%s\"", 193 "os=\"%s\" arch=\"%s\" nacl_arch=\"%s\"",
191 prod_id.c_str(), // "version" is prefixed by prod_id. 194 prod_id.c_str(), // "version" is prefixed by prod_id.
192 browser_version.c_str(), 195 browser_version.c_str(),
193 browser_version.c_str(), // "prodversion" 196 browser_version.c_str(), // "prodversion"
194 base::GenerateGUID().c_str(), // "requestid" 197 base::GenerateGUID().c_str(), // "requestid"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 base::JoinString(component.events(), "").c_str())); // events 347 base::JoinString(component.events(), "").c_str())); // events
345 348
346 // The ping request does not include any updater state. 349 // The ping request does not include any updater state.
347 return BuildProtocolRequest( 350 return BuildProtocolRequest(
348 config.GetProdId(), config.GetBrowserVersion().GetString(), 351 config.GetProdId(), config.GetBrowserVersion().GetString(),
349 config.GetChannel(), config.GetLang(), config.GetOSLongName(), 352 config.GetChannel(), config.GetLang(), config.GetOSLongName(),
350 config.GetDownloadPreference(), app_element, "", nullptr); 353 config.GetDownloadPreference(), app_element, "", nullptr);
351 } 354 }
352 355
353 } // namespace update_client 356 } // namespace update_client
OLDNEW
« no previous file with comments | « no previous file | components/update_client/update_query_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698