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

Side by Side Diff: components/policy/core/common/cloud/cloud_policy_client.cc

Issue 2422083002: Remove usage of FOR_EACH_OBSERVER macro in components/policy (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) 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 "components/policy/core/common/cloud/cloud_policy_client.h" 5 #include "components/policy/core/common/cloud/cloud_policy_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 const enterprise_management::DeviceManagementResponse& response) { 762 const enterprise_management::DeviceManagementResponse& response) {
763 status_ = status; 763 status_ = status;
764 if (status != DM_STATUS_SUCCESS) 764 if (status != DM_STATUS_SUCCESS)
765 NotifyClientError(); 765 NotifyClientError();
766 766
767 callback.Run(status == DM_STATUS_SUCCESS); 767 callback.Run(status == DM_STATUS_SUCCESS);
768 RemoveJob(job); 768 RemoveJob(job);
769 } 769 }
770 770
771 void CloudPolicyClient::NotifyPolicyFetched() { 771 void CloudPolicyClient::NotifyPolicyFetched() {
772 FOR_EACH_OBSERVER(Observer, observers_, OnPolicyFetched(this)); 772 for (auto& observer : observers_)
773 observer.OnPolicyFetched(this);
773 } 774 }
774 775
775 void CloudPolicyClient::NotifyRegistrationStateChanged() { 776 void CloudPolicyClient::NotifyRegistrationStateChanged() {
776 FOR_EACH_OBSERVER(Observer, observers_, OnRegistrationStateChanged(this)); 777 for (auto& observer : observers_)
778 observer.OnRegistrationStateChanged(this);
777 } 779 }
778 780
779 void CloudPolicyClient::NotifyRobotAuthCodesFetched() { 781 void CloudPolicyClient::NotifyRobotAuthCodesFetched() {
780 FOR_EACH_OBSERVER(Observer, observers_, OnRobotAuthCodesFetched(this)); 782 for (auto& observer : observers_)
783 observer.OnRobotAuthCodesFetched(this);
781 } 784 }
782 785
783 void CloudPolicyClient::NotifyClientError() { 786 void CloudPolicyClient::NotifyClientError() {
784 FOR_EACH_OBSERVER(Observer, observers_, OnClientError(this)); 787 for (auto& observer : observers_)
788 observer.OnClientError(this);
785 } 789 }
786 790
787 } // namespace policy 791 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698