| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/component.h" | 5 #include "components/update_client/component.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 return crx_update_item; | 192 return crx_update_item; |
| 193 } | 193 } |
| 194 | 194 |
| 195 void Component::SetParseResult(const UpdateResponse::Result& result) { | 195 void Component::SetParseResult(const UpdateResponse::Result& result) { |
| 196 DCHECK(thread_checker_.CalledOnValidThread()); | 196 DCHECK(thread_checker_.CalledOnValidThread()); |
| 197 | 197 |
| 198 DCHECK_EQ(0, update_check_error_); | 198 DCHECK_EQ(0, update_check_error_); |
| 199 | 199 |
| 200 status_ = result.status; | 200 status_ = result.status; |
| 201 action_run_ = result.action_run; |
| 201 | 202 |
| 202 if (result.manifest.packages.empty()) | 203 if (result.manifest.packages.empty()) |
| 203 return; | 204 return; |
| 204 | 205 |
| 205 next_version_ = base::Version(result.manifest.version); | 206 next_version_ = base::Version(result.manifest.version); |
| 206 const auto& package = result.manifest.packages.front(); | 207 const auto& package = result.manifest.packages.front(); |
| 207 next_fp_ = package.fingerprint; | 208 next_fp_ = package.fingerprint; |
| 208 | 209 |
| 209 // Resolve the urls by combining the base urls with the package names. | 210 // Resolve the urls by combining the base urls with the package names. |
| 210 for (const auto& crx_url : result.crx_urls) { | 211 for (const auto& crx_url : result.crx_urls) { |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 Component::StateUninstalled::~StateUninstalled() { | 693 Component::StateUninstalled::~StateUninstalled() { |
| 693 DCHECK(thread_checker_.CalledOnValidThread()); | 694 DCHECK(thread_checker_.CalledOnValidThread()); |
| 694 } | 695 } |
| 695 | 696 |
| 696 void Component::StateUninstalled::DoHandle() { | 697 void Component::StateUninstalled::DoHandle() { |
| 697 DCHECK(thread_checker_.CalledOnValidThread()); | 698 DCHECK(thread_checker_.CalledOnValidThread()); |
| 698 TransitionState(nullptr); | 699 TransitionState(nullptr); |
| 699 } | 700 } |
| 700 | 701 |
| 701 } // namespace update_client | 702 } // namespace update_client |
| OLD | NEW |