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

Side by Side Diff: chrome/browser/chromeos/device/input_service_proxy.cc

Issue 2416763002: Replace FOR_EACH_OBSERVER in c/b/chromeos with range-based for (Closed)
Patch Set: Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/device/input_service_proxy.h" 5 #include "chrome/browser/chromeos/device/input_service_proxy.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/task_runner_util.h" 9 #include "base/task_runner_util.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 140
141 // static 141 // static
142 void InputServiceProxy::SetThreadIdForTesting(BrowserThread::ID thread_id) { 142 void InputServiceProxy::SetThreadIdForTesting(BrowserThread::ID thread_id) {
143 InputServiceProxy::thread_identifier_ = thread_id; 143 InputServiceProxy::thread_identifier_ = thread_id;
144 } 144 }
145 145
146 void InputServiceProxy::OnDeviceAdded( 146 void InputServiceProxy::OnDeviceAdded(
147 const InputServiceLinux::InputDeviceInfo& info) { 147 const InputServiceLinux::InputDeviceInfo& info) {
148 DCHECK(thread_checker_.CalledOnValidThread()); 148 DCHECK(thread_checker_.CalledOnValidThread());
149 FOR_EACH_OBSERVER(Observer, observers_, OnInputDeviceAdded(info)); 149 for (auto& observer : observers_)
150 observer.OnInputDeviceAdded(info);
150 } 151 }
151 152
152 void InputServiceProxy::OnDeviceRemoved(const std::string& id) { 153 void InputServiceProxy::OnDeviceRemoved(const std::string& id) {
153 DCHECK(thread_checker_.CalledOnValidThread()); 154 DCHECK(thread_checker_.CalledOnValidThread());
154 FOR_EACH_OBSERVER(Observer, observers_, OnInputDeviceRemoved(id)); 155 for (auto& observer : observers_)
156 observer.OnInputDeviceRemoved(id);
155 } 157 }
156 158
157 } // namespace chromeos 159 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/camera_presence_notifier.cc ('k') | chrome/browser/chromeos/drive/drive_integration_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698