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

Side by Side Diff: chromeos/dbus/shill_client_helper.cc

Issue 2413963002: Replace FOR_EACH_OBSERVER in chromeos/ with range-based for (Closed)
Patch Set: Run the script again with '/mg' 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
« no previous file with comments | « chromeos/dbus/session_manager_client.cc ('k') | chromeos/dbus/system_clock_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chromeos/dbus/shill_client_helper.h" 5 #include "chromeos/dbus/shill_client_helper.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 return; 540 return;
541 541
542 dbus::MessageReader reader(signal); 542 dbus::MessageReader reader(signal);
543 std::string name; 543 std::string name;
544 if (!reader.PopString(&name)) 544 if (!reader.PopString(&name))
545 return; 545 return;
546 std::unique_ptr<base::Value> value(dbus::PopDataAsValue(&reader)); 546 std::unique_ptr<base::Value> value(dbus::PopDataAsValue(&reader));
547 if (!value.get()) 547 if (!value.get())
548 return; 548 return;
549 549
550 FOR_EACH_OBSERVER(ShillPropertyChangedObserver, observer_list_, 550 for (auto& observer : observer_list_)
551 OnPropertyChanged(name, *value)); 551 observer.OnPropertyChanged(name, *value);
552 } 552 }
553 553
554 } // namespace chromeos 554 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/session_manager_client.cc ('k') | chromeos/dbus/system_clock_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698