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

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

Issue 2199423002: Mechanical change in the component updater Configurator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 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.h" 5 #include "components/update_client/action.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 13 matching lines...) Expand all
24 24
25 using Events = UpdateClient::Observer::Events; 25 using Events = UpdateClient::Observer::Events;
26 26
27 namespace { 27 namespace {
28 28
29 // Returns true if a differential update is available, it has not failed yet, 29 // Returns true if a differential update is available, it has not failed yet,
30 // and the configuration allows this update. 30 // and the configuration allows this update.
31 bool CanTryDiffUpdate(const CrxUpdateItem* update_item, 31 bool CanTryDiffUpdate(const CrxUpdateItem* update_item,
32 const scoped_refptr<Configurator>& config) { 32 const scoped_refptr<Configurator>& config) {
33 return HasDiffUpdate(update_item) && !update_item->diff_update_failed && 33 return HasDiffUpdate(update_item) && !update_item->diff_update_failed &&
34 config->DeltasEnabled(); 34 config->EnabledDeltas();
35 } 35 }
36 36
37 } // namespace 37 } // namespace
38 38
39 ActionImpl::ActionImpl() : update_context_(nullptr) { 39 ActionImpl::ActionImpl() : update_context_(nullptr) {
40 } 40 }
41 41
42 ActionImpl::~ActionImpl() { 42 ActionImpl::~ActionImpl() {
43 DCHECK(thread_checker_.CalledOnValidThread()); 43 DCHECK(thread_checker_.CalledOnValidThread());
44 } 44 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 173 }
174 174
175 void ActionImpl::UpdateComplete(int error) { 175 void ActionImpl::UpdateComplete(int error) {
176 DCHECK(thread_checker_.CalledOnValidThread()); 176 DCHECK(thread_checker_.CalledOnValidThread());
177 177
178 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, 178 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
179 base::Bind(callback_, error)); 179 base::Bind(callback_, error));
180 } 180 }
181 181
182 } // namespace update_client 182 } // namespace update_client
OLDNEW
« no previous file with comments | « components/component_updater/configurator_impl.cc ('k') | components/update_client/action_update.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698