OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/utils.h" | 5 #include "components/update_client/utils.h" |
6 | 6 |
| 7 #include <stddef.h> |
7 #include <stdint.h> | 8 #include <stdint.h> |
8 #include <cmath> | 9 #include <cmath> |
9 | 10 |
10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
11 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
12 #include "base/guid.h" | 13 #include "base/guid.h" |
13 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/string_piece.h" | 15 #include "base/strings/string_piece.h" |
15 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
16 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
17 #include "base/sys_info.h" | 18 #include "base/sys_info.h" |
18 #include "base/win/windows_version.h" | 19 #include "base/win/windows_version.h" |
| 20 #include "build/build_config.h" |
19 #include "components/crx_file/id_util.h" | 21 #include "components/crx_file/id_util.h" |
20 #include "components/update_client/configurator.h" | 22 #include "components/update_client/configurator.h" |
21 #include "components/update_client/crx_update_item.h" | 23 #include "components/update_client/crx_update_item.h" |
22 #include "components/update_client/update_client.h" | 24 #include "components/update_client/update_client.h" |
23 #include "components/update_client/update_query_params.h" | 25 #include "components/update_client/update_query_params.h" |
24 #include "net/base/load_flags.h" | 26 #include "net/base/load_flags.h" |
25 #include "net/url_request/url_fetcher.h" | 27 #include "net/url_request/url_fetcher.h" |
26 #include "net/url_request/url_request_context_getter.h" | 28 #include "net/url_request/url_request_context_getter.h" |
27 #include "net/url_request/url_request_status.h" | 29 #include "net/url_request/url_request_status.h" |
28 | 30 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 188 } |
187 | 189 |
188 std::string GetCrxComponentID(const CrxComponent& component) { | 190 std::string GetCrxComponentID(const CrxComponent& component) { |
189 const size_t kCrxIdSize = 16; | 191 const size_t kCrxIdSize = 16; |
190 CHECK_GE(component.pk_hash.size(), kCrxIdSize); | 192 CHECK_GE(component.pk_hash.size(), kCrxIdSize); |
191 return HexStringToID(base::ToLowerASCII( | 193 return HexStringToID(base::ToLowerASCII( |
192 base::HexEncode(&component.pk_hash[0], kCrxIdSize))); | 194 base::HexEncode(&component.pk_hash[0], kCrxIdSize))); |
193 } | 195 } |
194 | 196 |
195 } // namespace update_client | 197 } // namespace update_client |
OLD | NEW |