| 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 <stddef.h> | 
|    8 #include <stdint.h> |    8 #include <stdint.h> | 
|    9  |    9  | 
|   10 #include <algorithm> |   10 #include <algorithm> | 
|   11 #include <cmath> |   11 #include <cmath> | 
|   12 #include <cstring> |   12 #include <cstring> | 
|   13 #include <vector> |   13 #include <vector> | 
|   14  |   14  | 
|   15 #include "base/callback.h" |  | 
|   16 #include "base/files/file_path.h" |   15 #include "base/files/file_path.h" | 
|   17 #include "base/files/file_util.h" |   16 #include "base/files/file_util.h" | 
|   18 #include "base/files/memory_mapped_file.h" |   17 #include "base/files/memory_mapped_file.h" | 
|   19 #include "base/guid.h" |   18 #include "base/guid.h" | 
|   20 #include "base/strings/string_number_conversions.h" |   19 #include "base/strings/string_number_conversions.h" | 
|   21 #include "base/strings/string_piece.h" |   20 #include "base/strings/string_piece.h" | 
|   22 #include "base/strings/string_util.h" |   21 #include "base/strings/string_util.h" | 
|   23 #include "base/strings/stringprintf.h" |   22 #include "base/strings/stringprintf.h" | 
|   24 #include "base/sys_info.h" |   23 #include "base/sys_info.h" | 
|   25 #include "base/win/windows_version.h" |   24 #include "base/win/windows_version.h" | 
|   26 #include "build/build_config.h" |   25 #include "build/build_config.h" | 
|   27 #include "components/crx_file/id_util.h" |   26 #include "components/crx_file/id_util.h" | 
|   28 #include "components/update_client/configurator.h" |   27 #include "components/update_client/configurator.h" | 
|   29 #include "components/update_client/crx_update_item.h" |   28 #include "components/update_client/crx_update_item.h" | 
|   30 #include "components/update_client/update_client.h" |   29 #include "components/update_client/update_client.h" | 
|   31 #include "components/update_client/update_client_errors.h" |  | 
|   32 #include "components/update_client/update_query_params.h" |   30 #include "components/update_client/update_query_params.h" | 
|   33 #include "crypto/secure_hash.h" |   31 #include "crypto/secure_hash.h" | 
|   34 #include "crypto/sha2.h" |   32 #include "crypto/sha2.h" | 
|   35 #include "net/base/load_flags.h" |   33 #include "net/base/load_flags.h" | 
|   36 #include "net/url_request/url_fetcher.h" |   34 #include "net/url_request/url_fetcher.h" | 
|   37 #include "net/url_request/url_request_context_getter.h" |   35 #include "net/url_request/url_request_context_getter.h" | 
|   38 #include "net/url_request/url_request_status.h" |   36 #include "net/url_request/url_request_status.h" | 
|   39 #include "url/gurl.h" |   37 #include "url/gurl.h" | 
|   40  |   38  | 
|   41 namespace update_client { |   39 namespace update_client { | 
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  305 } |  303 } | 
|  306  |  304  | 
|  307 void RemoveUnsecureUrls(std::vector<GURL>* urls) { |  305 void RemoveUnsecureUrls(std::vector<GURL>* urls) { | 
|  308   DCHECK(urls); |  306   DCHECK(urls); | 
|  309   urls->erase(std::remove_if( |  307   urls->erase(std::remove_if( | 
|  310                   urls->begin(), urls->end(), |  308                   urls->begin(), urls->end(), | 
|  311                   [](const GURL& url) { return !url.SchemeIsCryptographic(); }), |  309                   [](const GURL& url) { return !url.SchemeIsCryptographic(); }), | 
|  312               urls->end()); |  310               urls->end()); | 
|  313 } |  311 } | 
|  314  |  312  | 
|  315 CrxInstaller::Result InstallFunctionWrapper(base::Callback<bool()> callback) { |  | 
|  316   return CrxInstaller::Result(callback.Run() ? InstallError::NONE |  | 
|  317                                              : InstallError::GENERIC_ERROR); |  | 
|  318 } |  | 
|  319  |  | 
|  320 }  // namespace update_client |  313 }  // namespace update_client | 
| OLD | NEW |