| OLD | NEW |
| 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 "chrome/browser/policy/cloud/cloud_policy_service.h" | 5 #include "chrome/browser/policy/cloud/cloud_policy_service.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "chrome/browser/policy/cloud/proto/device_management_backend.pb.h" | 8 #include "chrome/browser/policy/cloud/proto/device_management_backend.pb.h" |
| 9 | 9 |
| 10 namespace em = enterprise_management; | 10 namespace em = enterprise_management; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 refresh_state_ = REFRESH_POLICY_STORE; | 70 refresh_state_ = REFRESH_POLICY_STORE; |
| 71 store_->Store(*policy); | 71 store_->Store(*policy); |
| 72 } else { | 72 } else { |
| 73 RefreshCompleted(false); | 73 RefreshCompleted(false); |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 void CloudPolicyService::OnRegistrationStateChanged(CloudPolicyClient* client) { | 77 void CloudPolicyService::OnRegistrationStateChanged(CloudPolicyClient* client) { |
| 78 } | 78 } |
| 79 | 79 |
| 80 void CloudPolicyService::OnRobotAuthCodesFetched(CloudPolicyClient* client) { |
| 81 } |
| 82 |
| 80 void CloudPolicyService::OnClientError(CloudPolicyClient* client) { | 83 void CloudPolicyService::OnClientError(CloudPolicyClient* client) { |
| 81 if (refresh_state_ == REFRESH_POLICY_FETCH) | 84 if (refresh_state_ == REFRESH_POLICY_FETCH) |
| 82 RefreshCompleted(false); | 85 RefreshCompleted(false); |
| 83 } | 86 } |
| 84 | 87 |
| 85 void CloudPolicyService::OnStoreLoaded(CloudPolicyStore* store) { | 88 void CloudPolicyService::OnStoreLoaded(CloudPolicyStore* store) { |
| 86 // Update the client with state from the store. | 89 // Update the client with state from the store. |
| 87 const em::PolicyData* policy(store_->policy()); | 90 const em::PolicyData* policy(store_->policy()); |
| 88 | 91 |
| 89 // Timestamp. | 92 // Timestamp. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 154 |
| 152 void CloudPolicyService::AddObserver(Observer* observer) { | 155 void CloudPolicyService::AddObserver(Observer* observer) { |
| 153 observers_.AddObserver(observer); | 156 observers_.AddObserver(observer); |
| 154 } | 157 } |
| 155 | 158 |
| 156 void CloudPolicyService::RemoveObserver(Observer* observer) { | 159 void CloudPolicyService::RemoveObserver(Observer* observer) { |
| 157 observers_.RemoveObserver(observer); | 160 observers_.RemoveObserver(observer); |
| 158 } | 161 } |
| 159 | 162 |
| 160 } // namespace policy | 163 } // namespace policy |
| OLD | NEW |