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

Side by Side Diff: ash/common/system/chromeos/power/power_status.cc

Issue 2414303002: Remove usage of FOR_EACH_OBSERVER macro in ash/common (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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ash/common/system/chromeos/power/power_status.h" 5 #include "ash/common/system/chromeos/power/power_status.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 void PowerStatus::SetProtoForTesting( 504 void PowerStatus::SetProtoForTesting(
505 const power_manager::PowerSupplyProperties& proto) { 505 const power_manager::PowerSupplyProperties& proto) {
506 proto_ = proto; 506 proto_ = proto;
507 SanitizeProto(&proto_); 507 SanitizeProto(&proto_);
508 } 508 }
509 509
510 void PowerStatus::PowerChanged( 510 void PowerStatus::PowerChanged(
511 const power_manager::PowerSupplyProperties& proto) { 511 const power_manager::PowerSupplyProperties& proto) {
512 proto_ = proto; 512 proto_ = proto;
513 SanitizeProto(&proto_); 513 SanitizeProto(&proto_);
514 FOR_EACH_OBSERVER(Observer, observers_, OnPowerStatusChanged()); 514 for (auto& observer : observers_)
515 observer.OnPowerStatusChanged();
515 } 516 }
516 517
517 } // namespace ash 518 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/vpn_delegate.cc ('k') | ash/common/system/tray/system_tray_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698