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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 if (it->manifest.version.empty()) { | 127 if (it->manifest.version.empty()) { |
128 // No version means no update available. | 128 // No version means no update available. |
129 ChangeItemState(crx, CrxUpdateItem::State::kNoUpdate); | 129 ChangeItemState(crx, CrxUpdateItem::State::kNoUpdate); |
130 VLOG(1) << "No update available for CRX: " << crx->id; | 130 VLOG(1) << "No update available for CRX: " << crx->id; |
131 continue; | 131 continue; |
132 } | 132 } |
133 | 133 |
134 if (!IsVersionNewer(crx->component.version, it->manifest.version)) { | 134 if (!IsVersionNewer(crx->component.version, it->manifest.version)) { |
135 // The CRX is up to date. | 135 // The CRX is up to date. |
136 ChangeItemState(crx, CrxUpdateItem::State::kUpToDate); | 136 ChangeItemState(crx, CrxUpdateItem::State::kUpToDate); |
137 VLOG(1) << "Component already up-to-date: " << crx->id; | 137 VLOG(1) << "Component already up to date: " << crx->id; |
138 continue; | 138 continue; |
139 } | 139 } |
140 | 140 |
141 if (!it->manifest.browser_min_version.empty()) { | 141 if (!it->manifest.browser_min_version.empty()) { |
142 if (IsVersionNewer(browser_version_, it->manifest.browser_min_version)) { | 142 if (IsVersionNewer(browser_version_, it->manifest.browser_min_version)) { |
143 // The CRX is not compatible with this Chrome version. | 143 // The CRX is not compatible with this Chrome version. |
144 VLOG(1) << "Ignoring incompatible CRX: " << crx->id; | 144 VLOG(1) << "Ignoring incompatible CRX: " << crx->id; |
145 ChangeItemState(crx, CrxUpdateItem::State::kNoUpdate); | 145 ChangeItemState(crx, CrxUpdateItem::State::kNoUpdate); |
146 continue; | 146 continue; |
147 } | 147 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 VLOG(1) << "Update check failed." << error; | 204 VLOG(1) << "Update check failed." << error; |
205 | 205 |
206 ChangeAllItemsState(CrxUpdateItem::State::kChecking, | 206 ChangeAllItemsState(CrxUpdateItem::State::kChecking, |
207 CrxUpdateItem::State::kNoUpdate); | 207 CrxUpdateItem::State::kNoUpdate); |
208 | 208 |
209 UpdateComplete(error); | 209 UpdateComplete(error); |
210 } | 210 } |
211 | 211 |
212 } // namespace update_client | 212 } // namespace update_client |
OLD | NEW |