| 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/device_management_service.h" | 5 #include "components/policy/core/common/cloud/device_management_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 case DeviceManagementRequestJob::TYPE_UPLOAD_STATUS: | 120 case DeviceManagementRequestJob::TYPE_UPLOAD_STATUS: |
| 121 return dm_protocol::kValueRequestUploadStatus; | 121 return dm_protocol::kValueRequestUploadStatus; |
| 122 case DeviceManagementRequestJob::TYPE_REMOTE_COMMANDS: | 122 case DeviceManagementRequestJob::TYPE_REMOTE_COMMANDS: |
| 123 return dm_protocol::kValueRequestRemoteCommands; | 123 return dm_protocol::kValueRequestRemoteCommands; |
| 124 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE_PERMISSION: | 124 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE_PERMISSION: |
| 125 return dm_protocol::kValueRequestDeviceAttributeUpdatePermission; | 125 return dm_protocol::kValueRequestDeviceAttributeUpdatePermission; |
| 126 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE: | 126 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE: |
| 127 return dm_protocol::kValueRequestDeviceAttributeUpdate; | 127 return dm_protocol::kValueRequestDeviceAttributeUpdate; |
| 128 case DeviceManagementRequestJob::TYPE_GCM_ID_UPDATE: | 128 case DeviceManagementRequestJob::TYPE_GCM_ID_UPDATE: |
| 129 return dm_protocol::kValueRequestGcmIdUpdate; | 129 return dm_protocol::kValueRequestGcmIdUpdate; |
| 130 case DeviceManagementRequestJob::TYPE_ANDROID_MANAGEMENT_CHECK: |
| 131 return dm_protocol::kValueRequestCheckAndroidManagement; |
| 130 } | 132 } |
| 131 NOTREACHED() << "Invalid job type " << type; | 133 NOTREACHED() << "Invalid job type " << type; |
| 132 return ""; | 134 return ""; |
| 133 } | 135 } |
| 134 | 136 |
| 135 } // namespace | 137 } // namespace |
| 136 | 138 |
| 137 // Request job implementation used with DeviceManagementService. | 139 // Request job implementation used with DeviceManagementService. |
| 138 class DeviceManagementRequestJobImpl : public DeviceManagementRequestJob { | 140 class DeviceManagementRequestJobImpl : public DeviceManagementRequestJob { |
| 139 public: | 141 public: |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 } | 521 } |
| 520 } | 522 } |
| 521 | 523 |
| 522 const JobQueue::iterator elem = | 524 const JobQueue::iterator elem = |
| 523 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); | 525 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); |
| 524 if (elem != queued_jobs_.end()) | 526 if (elem != queued_jobs_.end()) |
| 525 queued_jobs_.erase(elem); | 527 queued_jobs_.erase(elem); |
| 526 } | 528 } |
| 527 | 529 |
| 528 } // namespace policy | 530 } // namespace policy |
| OLD | NEW |