| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 case DeviceManagementRequestJob::TYPE_DEVICE_STATE_RETRIEVAL: | 116 case DeviceManagementRequestJob::TYPE_DEVICE_STATE_RETRIEVAL: |
| 117 return dm_protocol::kValueRequestDeviceStateRetrieval; | 117 return dm_protocol::kValueRequestDeviceStateRetrieval; |
| 118 case DeviceManagementRequestJob::TYPE_UPLOAD_STATUS: | 118 case DeviceManagementRequestJob::TYPE_UPLOAD_STATUS: |
| 119 return dm_protocol::kValueRequestUploadStatus; | 119 return dm_protocol::kValueRequestUploadStatus; |
| 120 case DeviceManagementRequestJob::TYPE_REMOTE_COMMANDS: | 120 case DeviceManagementRequestJob::TYPE_REMOTE_COMMANDS: |
| 121 return dm_protocol::kValueRequestRemoteCommands; | 121 return dm_protocol::kValueRequestRemoteCommands; |
| 122 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE_PERMISSION: | 122 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE_PERMISSION: |
| 123 return dm_protocol::kValueRequestDeviceAttributeUpdatePermission; | 123 return dm_protocol::kValueRequestDeviceAttributeUpdatePermission; |
| 124 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE: | 124 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE: |
| 125 return dm_protocol::kValueRequestDeviceAttributeUpdate; | 125 return dm_protocol::kValueRequestDeviceAttributeUpdate; |
| 126 case DeviceManagementRequestJob::TYPE_GCM_ID_UPDATE: |
| 127 return dm_protocol::kValueRequestGcmIdUpdate; |
| 126 } | 128 } |
| 127 NOTREACHED() << "Invalid job type " << type; | 129 NOTREACHED() << "Invalid job type " << type; |
| 128 return ""; | 130 return ""; |
| 129 } | 131 } |
| 130 | 132 |
| 131 } // namespace | 133 } // namespace |
| 132 | 134 |
| 133 // Request job implementation used with DeviceManagementService. | 135 // Request job implementation used with DeviceManagementService. |
| 134 class DeviceManagementRequestJobImpl : public DeviceManagementRequestJob { | 136 class DeviceManagementRequestJobImpl : public DeviceManagementRequestJob { |
| 135 public: | 137 public: |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 } | 514 } |
| 513 } | 515 } |
| 514 | 516 |
| 515 const JobQueue::iterator elem = | 517 const JobQueue::iterator elem = |
| 516 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); | 518 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); |
| 517 if (elem != queued_jobs_.end()) | 519 if (elem != queued_jobs_.end()) |
| 518 queued_jobs_.erase(elem); | 520 queued_jobs_.erase(elem); |
| 519 } | 521 } |
| 520 | 522 |
| 521 } // namespace policy | 523 } // namespace policy |
| OLD | NEW |