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 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/guid.h" | 9 #include "base/guid.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | 36 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" |
37 "<request protocol=\"3.0\" "); | 37 "<request protocol=\"3.0\" "); |
38 | 38 |
39 if (!additional_attributes.empty()) | 39 if (!additional_attributes.empty()) |
40 base::StringAppendF(&request, "%s ", additional_attributes.c_str()); | 40 base::StringAppendF(&request, "%s ", additional_attributes.c_str()); |
41 | 41 |
42 // Chrome version and platform information. | 42 // Chrome version and platform information. |
43 base::StringAppendF( | 43 base::StringAppendF( |
44 &request, | 44 &request, |
45 "version=\"%s-%s\" prodversion=\"%s\" " | 45 "version=\"%s-%s\" prodversion=\"%s\" " |
46 "requestid=\"{%s}\" updaterchannel=\"%s\" prodchannel=\"%s\" " | 46 "requestid=\"{%s}\" lang=\"%s\" updaterchannel=\"%s\" prodchannel=\"%s\" " |
47 "os=\"%s\" arch=\"%s\" nacl_arch=\"%s\"", | 47 "os=\"%s\" arch=\"%s\" nacl_arch=\"%s\"", |
48 prod_id.c_str(), | 48 prod_id.c_str(), |
49 chrome_version.c_str(), // "version" | 49 chrome_version.c_str(), // "version" |
50 chrome_version.c_str(), // "prodversion" | 50 chrome_version.c_str(), // "prodversion" |
51 base::GenerateGUID().c_str(), // "requestid" | 51 base::GenerateGUID().c_str(), // "requestid" |
| 52 chrome::OmahaQueryParams::GetLang(), // "lang", |
52 chrome::OmahaQueryParams::GetChannelString(), // "updaterchannel" | 53 chrome::OmahaQueryParams::GetChannelString(), // "updaterchannel" |
53 chrome::OmahaQueryParams::GetChannelString(), // "prodchannel" | 54 chrome::OmahaQueryParams::GetChannelString(), // "prodchannel" |
54 chrome::OmahaQueryParams::GetOS(), // "os" | 55 chrome::OmahaQueryParams::GetOS(), // "os" |
55 chrome::OmahaQueryParams::GetArch(), // "arch" | 56 chrome::OmahaQueryParams::GetArch(), // "arch" |
56 chrome::OmahaQueryParams::GetNaclArch()); // "nacl_arch" | 57 chrome::OmahaQueryParams::GetNaclArch()); // "nacl_arch" |
57 #if defined(OS_WIN) | 58 #if defined(OS_WIN) |
58 const bool is_wow64( | 59 const bool is_wow64( |
59 base::win::OSInfo::GetInstance()->wow64_status() == | 60 base::win::OSInfo::GetInstance()->wow64_status() == |
60 base::win::OSInfo::WOW64_ENABLED); | 61 base::win::OSInfo::WOW64_ENABLED); |
61 if (is_wow64) | 62 if (is_wow64) |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 return id; | 168 return id; |
168 } | 169 } |
169 | 170 |
170 std::string GetCrxComponentID(const CrxComponent& component) { | 171 std::string GetCrxComponentID(const CrxComponent& component) { |
171 return HexStringToID(StringToLowerASCII(base::HexEncode(&component.pk_hash[0], | 172 return HexStringToID(StringToLowerASCII(base::HexEncode(&component.pk_hash[0], |
172 component.pk_hash.size()/2))); | 173 component.pk_hash.size()/2))); |
173 } | 174 } |
174 | 175 |
175 } // namespace component_updater | 176 } // namespace component_updater |
176 | 177 |
OLD | NEW |