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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 case DeviceManagementRequestJob::TYPE_REMOTE_COMMANDS: | 140 case DeviceManagementRequestJob::TYPE_REMOTE_COMMANDS: |
141 return dm_protocol::kValueRequestRemoteCommands; | 141 return dm_protocol::kValueRequestRemoteCommands; |
142 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE_PERMISSION: | 142 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE_PERMISSION: |
143 return dm_protocol::kValueRequestDeviceAttributeUpdatePermission; | 143 return dm_protocol::kValueRequestDeviceAttributeUpdatePermission; |
144 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE: | 144 case DeviceManagementRequestJob::TYPE_ATTRIBUTE_UPDATE: |
145 return dm_protocol::kValueRequestDeviceAttributeUpdate; | 145 return dm_protocol::kValueRequestDeviceAttributeUpdate; |
146 case DeviceManagementRequestJob::TYPE_GCM_ID_UPDATE: | 146 case DeviceManagementRequestJob::TYPE_GCM_ID_UPDATE: |
147 return dm_protocol::kValueRequestGcmIdUpdate; | 147 return dm_protocol::kValueRequestGcmIdUpdate; |
148 case DeviceManagementRequestJob::TYPE_ANDROID_MANAGEMENT_CHECK: | 148 case DeviceManagementRequestJob::TYPE_ANDROID_MANAGEMENT_CHECK: |
149 return dm_protocol::kValueRequestCheckAndroidManagement; | 149 return dm_protocol::kValueRequestCheckAndroidManagement; |
| 150 case DeviceManagementRequestJob::TYPE_CERT_BASED_REGISTRATION: |
| 151 return dm_protocol::kValueRequestCertBasedRegister; |
150 } | 152 } |
151 NOTREACHED() << "Invalid job type " << type; | 153 NOTREACHED() << "Invalid job type " << type; |
152 return ""; | 154 return ""; |
153 } | 155 } |
154 | 156 |
155 } // namespace | 157 } // namespace |
156 | 158 |
157 // Request job implementation used with DeviceManagementService. | 159 // Request job implementation used with DeviceManagementService. |
158 class DeviceManagementRequestJobImpl : public DeviceManagementRequestJob { | 160 class DeviceManagementRequestJobImpl : public DeviceManagementRequestJob { |
159 public: | 161 public: |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 } | 580 } |
579 } | 581 } |
580 | 582 |
581 const JobQueue::iterator elem = | 583 const JobQueue::iterator elem = |
582 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); | 584 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); |
583 if (elem != queued_jobs_.end()) | 585 if (elem != queued_jobs_.end()) |
584 queued_jobs_.erase(elem); | 586 queued_jobs_.erase(elem); |
585 } | 587 } |
586 | 588 |
587 } // namespace policy | 589 } // namespace policy |
OLD | NEW |