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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 case DeviceManagementRequestJob::TYPE_POLICY_FETCH: | 118 case DeviceManagementRequestJob::TYPE_POLICY_FETCH: |
119 return dm_protocol::kValueRequestPolicy; | 119 return dm_protocol::kValueRequestPolicy; |
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: |
| 129 return dm_protocol::kValueRequestUploadStatus; |
128 } | 130 } |
129 NOTREACHED() << "Invalid job type " << type; | 131 NOTREACHED() << "Invalid job type " << type; |
130 return ""; | 132 return ""; |
131 } | 133 } |
132 | 134 |
133 } // namespace | 135 } // namespace |
134 | 136 |
135 // Request job implementation used with DeviceManagementService. | 137 // Request job implementation used with DeviceManagementService. |
136 class DeviceManagementRequestJobImpl : public DeviceManagementRequestJob { | 138 class DeviceManagementRequestJobImpl : public DeviceManagementRequestJob { |
137 public: | 139 public: |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 } | 522 } |
521 } | 523 } |
522 | 524 |
523 const JobQueue::iterator elem = | 525 const JobQueue::iterator elem = |
524 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); | 526 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); |
525 if (elem != queued_jobs_.end()) | 527 if (elem != queued_jobs_.end()) |
526 queued_jobs_.erase(elem); | 528 queued_jobs_.erase(elem); |
527 } | 529 } |
528 | 530 |
529 } // namespace policy | 531 } // namespace policy |
OLD | NEW |