| 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 "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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 RemoveJob(job); | 651 RemoveJob(job); |
| 652 } | 652 } |
| 653 | 653 |
| 654 void CloudPolicyClient::OnDeviceAttributeUpdatePermissionCompleted( | 654 void CloudPolicyClient::OnDeviceAttributeUpdatePermissionCompleted( |
| 655 const DeviceManagementRequestJob* job, | 655 const DeviceManagementRequestJob* job, |
| 656 const CloudPolicyClient::StatusCallback& callback, | 656 const CloudPolicyClient::StatusCallback& callback, |
| 657 DeviceManagementStatus status, | 657 DeviceManagementStatus status, |
| 658 int net_error, | 658 int net_error, |
| 659 const em::DeviceManagementResponse& response) { | 659 const em::DeviceManagementResponse& response) { |
| 660 // TODO(pbond): remove this LOG once http://crbug.com/586961 is fixed. | 660 // TODO(pbond): remove this LOG once http://crbug.com/586961 is fixed. |
| 661 LOG(WARNING) << "Recieve DeviceAttributeUpdatePermissionResponse status=" | 661 LOG(WARNING) << "Receive DeviceAttributeUpdatePermissionResponse status=" |
| 662 << status << " net_error=" << net_error; | 662 << status << " net_error=" << net_error; |
| 663 bool success = false; | 663 bool success = false; |
| 664 | 664 |
| 665 if (status == DM_STATUS_SUCCESS && | 665 if (status == DM_STATUS_SUCCESS && |
| 666 !response.has_device_attribute_update_permission_response()) { | 666 !response.has_device_attribute_update_permission_response()) { |
| 667 LOG(WARNING) << "Invalid device attribute update permission response."; | 667 LOG(WARNING) << "Invalid device attribute update permission response."; |
| 668 status = DM_STATUS_RESPONSE_DECODING_ERROR; | 668 status = DM_STATUS_RESPONSE_DECODING_ERROR; |
| 669 } | 669 } |
| 670 | 670 |
| 671 status_ = status; | 671 status_ = status; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 for (auto& observer : observers_) | 783 for (auto& observer : observers_) |
| 784 observer.OnRobotAuthCodesFetched(this); | 784 observer.OnRobotAuthCodesFetched(this); |
| 785 } | 785 } |
| 786 | 786 |
| 787 void CloudPolicyClient::NotifyClientError() { | 787 void CloudPolicyClient::NotifyClientError() { |
| 788 for (auto& observer : observers_) | 788 for (auto& observer : observers_) |
| 789 observer.OnClientError(this); | 789 observer.OnClientError(this); |
| 790 } | 790 } |
| 791 | 791 |
| 792 } // namespace policy | 792 } // namespace policy |
| OLD | NEW |