OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |