Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(760)

Side by Side Diff: components/policy/core/common/cloud/device_management_service.cc

Issue 2261763002: Device enterprise registration with a certificate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize pointers to nullptr. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698