| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/action_update_check.h" | 5 #include "components/update_client/action_update_check.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 item->download_metrics.clear(); | 84 item->download_metrics.clear(); |
| 85 | 85 |
| 86 update_context_->update_items.push_back(item.get()); | 86 update_context_->update_items.push_back(item.get()); |
| 87 | 87 |
| 88 ChangeItemState(item.get(), CrxUpdateItem::State::kChecking); | 88 ChangeItemState(item.get(), CrxUpdateItem::State::kChecking); |
| 89 ignore_result(item.release()); | 89 ignore_result(item.release()); |
| 90 } | 90 } |
| 91 | 91 |
| 92 update_checker_->CheckForUpdates( | 92 update_checker_->CheckForUpdates( |
| 93 update_context_->update_items, extra_request_parameters_, | 93 update_context_->update_items, extra_request_parameters_, |
| 94 update_context_->enabled_component_updates, |
| 94 base::Bind(&ActionUpdateCheck::UpdateCheckComplete, | 95 base::Bind(&ActionUpdateCheck::UpdateCheckComplete, |
| 95 base::Unretained(this))); | 96 base::Unretained(this))); |
| 96 } | 97 } |
| 97 | 98 |
| 98 void ActionUpdateCheck::UpdateCheckComplete( | 99 void ActionUpdateCheck::UpdateCheckComplete( |
| 99 int error, | 100 int error, |
| 100 const UpdateResponse::Results& results, | 101 const UpdateResponse::Results& results, |
| 101 int retry_after_sec) { | 102 int retry_after_sec) { |
| 102 DCHECK(thread_checker_.CalledOnValidThread()); | 103 DCHECK(thread_checker_.CalledOnValidThread()); |
| 103 | 104 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 204 |
| 204 VLOG(1) << "Update check failed." << error; | 205 VLOG(1) << "Update check failed." << error; |
| 205 | 206 |
| 206 ChangeAllItemsState(CrxUpdateItem::State::kChecking, | 207 ChangeAllItemsState(CrxUpdateItem::State::kChecking, |
| 207 CrxUpdateItem::State::kNoUpdate); | 208 CrxUpdateItem::State::kNoUpdate); |
| 208 | 209 |
| 209 UpdateComplete(error); | 210 UpdateComplete(error); |
| 210 } | 211 } |
| 211 | 212 |
| 212 } // namespace update_client | 213 } // namespace update_client |
| OLD | NEW |