| 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; | |
| 128 } | 126 } |
| 129 NOTREACHED() << "Invalid job type " << type; | 127 NOTREACHED() << "Invalid job type " << type; |
| 130 return ""; | 128 return ""; |
| 131 } | 129 } |
| 132 | 130 |
| 133 } // namespace | 131 } // namespace |
| 134 | 132 |
| 135 // Request job implementation used with DeviceManagementService. | 133 // Request job implementation used with DeviceManagementService. |
| 136 class DeviceManagementRequestJobImpl : public DeviceManagementRequestJob { | 134 class DeviceManagementRequestJobImpl : public DeviceManagementRequestJob { |
| 137 public: | 135 public: |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 } | 512 } |
| 515 } | 513 } |
| 516 | 514 |
| 517 const JobQueue::iterator elem = | 515 const JobQueue::iterator elem = |
| 518 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); | 516 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); |
| 519 if (elem != queued_jobs_.end()) | 517 if (elem != queued_jobs_.end()) |
| 520 queued_jobs_.erase(elem); | 518 queued_jobs_.erase(elem); |
| 521 } | 519 } |
| 522 | 520 |
| 523 } // namespace policy | 521 } // namespace policy |
| OLD | NEW |