Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Side by Side Diff: components/update_client/component.cc

Issue 2847023002: Parse update check run actions for the component updater. (Closed)
Patch Set: Added missing data file dependency. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/update_client/component.h ('k') | components/update_client/request_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698