| 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 "chrome/browser/component_updater/update_checker.h" | 5 #include "components/component_updater/update_checker.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
| 11 #include "chrome/browser/component_updater/component_updater_configurator.h" | 11 #include "components/component_updater/component_updater_configurator.h" |
| 12 #include "chrome/browser/component_updater/component_updater_utils.h" | 12 #include "components/component_updater/component_updater_utils.h" |
| 13 #include "chrome/browser/component_updater/crx_update_item.h" | 13 #include "components/component_updater/crx_update_item.h" |
| 14 #include "net/url_request/url_fetcher.h" | 14 #include "net/url_request/url_fetcher.h" |
| 15 #include "net/url_request/url_fetcher_delegate.h" | 15 #include "net/url_request/url_fetcher_delegate.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 namespace component_updater { | 18 namespace component_updater { |
| 19 | 19 |
| 20 // Builds an update check request for |components|. |additional_attributes| is | 20 // Builds an update check request for |components|. |additional_attributes| is |
| 21 // serialized as part of the <request> element of the request to customize it | 21 // serialized as part of the <request> element of the request to customize it |
| 22 // with data that is not platform or component specific. For each |item|, a | 22 // with data that is not platform or component specific. For each |item|, a |
| 23 // corresponding <app> element is created and inserted as a child node of | 23 // corresponding <app> element is created and inserted as a child node of |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 error = GetFetchError(*source); | 146 error = GetFetchError(*source); |
| 147 error_message.assign("network error"); | 147 error_message.assign("network error"); |
| 148 VLOG(1) << "Update request failed: network error"; | 148 VLOG(1) << "Update request failed: network error"; |
| 149 } | 149 } |
| 150 | 150 |
| 151 url_fetcher_.reset(); | 151 url_fetcher_.reset(); |
| 152 update_check_callback_.Run(error, error_message, update_response.results()); | 152 update_check_callback_.Run(error, error_message, update_response.results()); |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace component_updater | 155 } // namespace component_updater |
| OLD | NEW |