| 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_API_AUTH_CODE_FETCH: | 120 case DeviceManagementRequestJob::TYPE_API_AUTH_CODE_FETCH: |
| 121 return dm_protocol::kValueRequestApiAuthorization; | 121 return dm_protocol::kValueRequestApiAuthorization; |
| 122 case DeviceManagementRequestJob::TYPE_UNREGISTRATION: | 122 case DeviceManagementRequestJob::TYPE_UNREGISTRATION: |
| 123 return dm_protocol::kValueRequestUnregister; | 123 return dm_protocol::kValueRequestUnregister; |
| 124 case DeviceManagementRequestJob::TYPE_UPLOAD_CERTIFICATE: | 124 case DeviceManagementRequestJob::TYPE_UPLOAD_CERTIFICATE: |
| 125 return dm_protocol::kValueRequestUploadCertificate; | 125 return dm_protocol::kValueRequestUploadCertificate; |
| 126 case DeviceManagementRequestJob::TYPE_DEVICE_STATE_RETRIEVAL: | 126 case DeviceManagementRequestJob::TYPE_DEVICE_STATE_RETRIEVAL: |
| 127 return dm_protocol::kValueRequestDeviceStateRetrieval; | 127 return dm_protocol::kValueRequestDeviceStateRetrieval; |
| 128 case DeviceManagementRequestJob::TYPE_UPLOAD_STATUS: | 128 case DeviceManagementRequestJob::TYPE_UPLOAD_STATUS: |
| 129 return dm_protocol::kValueRequestUploadStatus; | 129 return dm_protocol::kValueRequestUploadStatus; |
| 130 case DeviceManagementRequestJob::TYPE_REMOTE_COMMANDS: |
| 131 return dm_protocol::kValueRequestRemoteCommands; |
| 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 } | 524 } |
| 523 } | 525 } |
| 524 | 526 |
| 525 const JobQueue::iterator elem = | 527 const JobQueue::iterator elem = |
| 526 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); | 528 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); |
| 527 if (elem != queued_jobs_.end()) | 529 if (elem != queued_jobs_.end()) |
| 528 queued_jobs_.erase(elem); | 530 queued_jobs_.erase(elem); |
| 529 } | 531 } |
| 530 | 532 |
| 531 } // namespace policy | 533 } // namespace policy |
| OLD | NEW |