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

Side by Side Diff: chrome/browser/component_updater/component_updater_utils.cc

Issue 134583002: Add "prodchannel" attribute in component updater update requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 | chrome/browser/component_updater/test/component_updater_service_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/component_updater/component_updater_utils.h" 5 #include "chrome/browser/component_updater/component_updater_utils.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 24 matching lines...) Expand all
35 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" 35 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
36 "<request protocol=\"3.0\" "); 36 "<request protocol=\"3.0\" ");
37 37
38 if (!additional_attributes.empty()) 38 if (!additional_attributes.empty())
39 base::StringAppendF(&request, "%s ", additional_attributes.c_str()); 39 base::StringAppendF(&request, "%s ", additional_attributes.c_str());
40 40
41 // Chrome version and platform information. 41 // Chrome version and platform information.
42 base::StringAppendF( 42 base::StringAppendF(
43 &request, 43 &request,
44 "version=\"%s-%s\" prodversion=\"%s\" " 44 "version=\"%s-%s\" prodversion=\"%s\" "
45 "requestid=\"{%s}\" updaterchannel=\"%s\" " 45 "requestid=\"{%s}\" updaterchannel=\"%s\" prodchannel=\"%s\" "
46 "os=\"%s\" arch=\"%s\" nacl_arch=\"%s\"", 46 "os=\"%s\" arch=\"%s\" nacl_arch=\"%s\"",
47 prod_id.c_str(), chrome_version.c_str(), // "version" 47 prod_id.c_str(), chrome_version.c_str(), // "version"
48 chrome_version.c_str(), // "prodversion" 48 chrome_version.c_str(), // "prodversion"
49 base::GenerateGUID().c_str(), // "requestid" 49 base::GenerateGUID().c_str(), // "requestid"
50 chrome::OmahaQueryParams::GetChannelString(), // "updaterchannel" 50 chrome::OmahaQueryParams::GetChannelString(), // "updaterchannel"
51 chrome::OmahaQueryParams::GetChannelString(), // "prodchannel"
51 chrome::OmahaQueryParams::getOS(), // "os" 52 chrome::OmahaQueryParams::getOS(), // "os"
52 chrome::OmahaQueryParams::getArch(), // "arch" 53 chrome::OmahaQueryParams::getArch(), // "arch"
53 chrome::OmahaQueryParams::getNaclArch()); // "nacl_arch" 54 chrome::OmahaQueryParams::getNaclArch()); // "nacl_arch"
54 #if defined(OS_WIN) 55 #if defined(OS_WIN)
55 const bool is_wow64( 56 const bool is_wow64(
56 base::win::OSInfo::GetInstance()->wow64_status() == 57 base::win::OSInfo::GetInstance()->wow64_status() ==
57 base::win::OSInfo::WOW64_ENABLED); 58 base::win::OSInfo::WOW64_ENABLED);
58 if (is_wow64) 59 if (is_wow64)
59 base::StringAppendF(&request, " wow64=\"1\""); 60 base::StringAppendF(&request, " wow64=\"1\"");
60 #endif 61 #endif
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 166 }
166 167
167 std::string GetCrxComponentID(const CrxComponent& component) { 168 std::string GetCrxComponentID(const CrxComponent& component) {
168 return component_updater::HexStringToID( 169 return component_updater::HexStringToID(
169 StringToLowerASCII(base::HexEncode(&component.pk_hash[0], 170 StringToLowerASCII(base::HexEncode(&component.pk_hash[0],
170 component.pk_hash.size()/2))); 171 component.pk_hash.size()/2)));
171 } 172 }
172 173
173 } // namespace component_updater 174 } // namespace component_updater
174 175
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/component_updater/test/component_updater_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698