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

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

Issue 2110663002: components: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+one fix Created 4 years, 5 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 case CrxUpdateItem::State::kLastStatus: 95 case CrxUpdateItem::State::kLastStatus:
96 // No notification for these states. 96 // No notification for these states.
97 break; 97 break;
98 } 98 }
99 } 99 }
100 100
101 size_t ActionImpl::ChangeAllItemsState(CrxUpdateItem::State from, 101 size_t ActionImpl::ChangeAllItemsState(CrxUpdateItem::State from,
102 CrxUpdateItem::State to) { 102 CrxUpdateItem::State to) {
103 DCHECK(thread_checker_.CalledOnValidThread()); 103 DCHECK(thread_checker_.CalledOnValidThread());
104 size_t count = 0; 104 size_t count = 0;
105 for (auto item : update_context_->update_items) { 105 for (auto* item : update_context_->update_items) {
106 if (item->state == from) { 106 if (item->state == from) {
107 ChangeItemState(item, to); 107 ChangeItemState(item, to);
108 ++count; 108 ++count;
109 } 109 }
110 } 110 }
111 return count; 111 return count;
112 } 112 }
113 113
114 void ActionImpl::NotifyObservers(UpdateClient::Observer::Events event, 114 void ActionImpl::NotifyObservers(UpdateClient::Observer::Events event,
115 const std::string& id) { 115 const std::string& id) {
(...skipping 57 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/tracing/common/graphics_memory_dump_provider_android_unittest.cc ('k') | components/update_client/action_wait.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698