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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 update_context_->crx_data_callback.Run(update_context_->ids, &crx_components); | 59 update_context_->crx_data_callback.Run(update_context_->ids, &crx_components); |
60 | 60 |
61 update_context_->update_items.reserve(crx_components.size()); | 61 update_context_->update_items.reserve(crx_components.size()); |
62 | 62 |
63 for (size_t i = 0; i != crx_components.size(); ++i) { | 63 for (size_t i = 0; i != crx_components.size(); ++i) { |
64 std::unique_ptr<CrxUpdateItem> item(new CrxUpdateItem); | 64 std::unique_ptr<CrxUpdateItem> item(new CrxUpdateItem); |
65 const CrxComponent& crx_component = crx_components[i]; | 65 const CrxComponent& crx_component = crx_components[i]; |
66 | 66 |
67 item->id = GetCrxComponentID(crx_component); | 67 item->id = GetCrxComponentID(crx_component); |
68 item->component = crx_component; | 68 item->component = crx_component; |
69 item->last_check = base::Time::Now(); | 69 item->last_check = base::TimeTicks::Now(); |
70 item->crx_urls.clear(); | 70 item->crx_urls.clear(); |
71 item->crx_diffurls.clear(); | 71 item->crx_diffurls.clear(); |
72 item->previous_version = crx_component.version; | 72 item->previous_version = crx_component.version; |
73 item->next_version = base::Version(); | 73 item->next_version = base::Version(); |
74 item->previous_fp = crx_component.fingerprint; | 74 item->previous_fp = crx_component.fingerprint; |
75 item->next_fp.clear(); | 75 item->next_fp.clear(); |
76 item->on_demand = update_context->is_foreground; | 76 item->on_demand = update_context->is_foreground; |
77 item->diff_update_failed = false; | 77 item->diff_update_failed = false; |
78 item->error_category = 0; | 78 item->error_category = 0; |
79 item->error_code = 0; | 79 item->error_code = 0; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 VLOG(1) << "Update check failed." << error; | 205 VLOG(1) << "Update check failed." << error; |
206 | 206 |
207 ChangeAllItemsState(CrxUpdateItem::State::kChecking, | 207 ChangeAllItemsState(CrxUpdateItem::State::kChecking, |
208 CrxUpdateItem::State::kNoUpdate); | 208 CrxUpdateItem::State::kNoUpdate); |
209 | 209 |
210 UpdateComplete(error); | 210 UpdateComplete(error); |
211 } | 211 } |
212 | 212 |
213 } // namespace update_client | 213 } // namespace update_client |
OLD | NEW |