| 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 "chrome/browser/policy/cloud/device_management_service.h" | 5 #include "chrome/browser/policy/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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 137 } |
| 138 | 138 |
| 139 const char* JobTypeToRequestType(DeviceManagementRequestJob::JobType type) { | 139 const char* JobTypeToRequestType(DeviceManagementRequestJob::JobType type) { |
| 140 switch (type) { | 140 switch (type) { |
| 141 case DeviceManagementRequestJob::TYPE_AUTO_ENROLLMENT: | 141 case DeviceManagementRequestJob::TYPE_AUTO_ENROLLMENT: |
| 142 return dm_protocol::kValueRequestAutoEnrollment; | 142 return dm_protocol::kValueRequestAutoEnrollment; |
| 143 case DeviceManagementRequestJob::TYPE_REGISTRATION: | 143 case DeviceManagementRequestJob::TYPE_REGISTRATION: |
| 144 return dm_protocol::kValueRequestRegister; | 144 return dm_protocol::kValueRequestRegister; |
| 145 case DeviceManagementRequestJob::TYPE_POLICY_FETCH: | 145 case DeviceManagementRequestJob::TYPE_POLICY_FETCH: |
| 146 return dm_protocol::kValueRequestPolicy; | 146 return dm_protocol::kValueRequestPolicy; |
| 147 case DeviceManagementRequestJob::TYPE_API_AUTH_CODE_FETCH: |
| 148 return dm_protocol::kValueRequestApiAuthorization; |
| 147 case DeviceManagementRequestJob::TYPE_UNREGISTRATION: | 149 case DeviceManagementRequestJob::TYPE_UNREGISTRATION: |
| 148 return dm_protocol::kValueRequestUnregister; | 150 return dm_protocol::kValueRequestUnregister; |
| 149 case DeviceManagementRequestJob::TYPE_UPLOAD_CERTIFICATE: | 151 case DeviceManagementRequestJob::TYPE_UPLOAD_CERTIFICATE: |
| 150 return dm_protocol::kValueRequestUploadCertificate; | 152 return dm_protocol::kValueRequestUploadCertificate; |
| 151 } | 153 } |
| 152 NOTREACHED() << "Invalid job type " << type; | 154 NOTREACHED() << "Invalid job type " << type; |
| 153 return ""; | 155 return ""; |
| 154 } | 156 } |
| 155 | 157 |
| 156 const std::string& GetAgentString() { | 158 const std::string& GetAgentString() { |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 } | 645 } |
| 644 } | 646 } |
| 645 | 647 |
| 646 const JobQueue::iterator elem = | 648 const JobQueue::iterator elem = |
| 647 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); | 649 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); |
| 648 if (elem != queued_jobs_.end()) | 650 if (elem != queued_jobs_.end()) |
| 649 queued_jobs_.erase(elem); | 651 queued_jobs_.erase(elem); |
| 650 } | 652 } |
| 651 | 653 |
| 652 } // namespace policy | 654 } // namespace policy |
| OLD | NEW |