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

Side by Side Diff: chrome/browser/chromeos/policy/fake_device_cloud_policy_initializer.cc

Issue 751703003: Implemented consumer management unenrollment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dcpm
Patch Set: Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/policy/fake_device_cloud_policy_initializer.h" 5 #include "chrome/browser/chromeos/policy/fake_device_cloud_policy_initializer.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/sequenced_task_runner.h" 8 #include "base/sequenced_task_runner.h"
9 #include "components/policy/core/common/cloud/device_management_service.h" 9 #include "components/policy/core/common/cloud/device_management_service.h"
10 10
11 namespace policy { 11 namespace policy {
12 12
13 FakeDeviceCloudPolicyInitializer::FakeDeviceCloudPolicyInitializer() 13 FakeDeviceCloudPolicyInitializer::FakeDeviceCloudPolicyInitializer()
14 : DeviceCloudPolicyInitializer( 14 : DeviceCloudPolicyInitializer(
15 NULL, // local_state 15 NULL, // local_state
16 NULL, // enterprise_service 16 NULL, // enterprise_service
17 NULL, // consumer_service 17 NULL, // consumer_service
18 // background_task_runner 18 // background_task_runner
19 scoped_refptr<base::SequencedTaskRunner>(NULL), 19 scoped_refptr<base::SequencedTaskRunner>(NULL),
20 NULL, // install_attributes 20 NULL, // install_attributes
21 NULL, // state_keys_broker 21 NULL, // state_keys_broker
22 NULL, // device_store 22 NULL, // device_store
23 NULL, // manager 23 NULL, // manager
24 NULL), // device_settings_service 24 NULL, // device_settings_service
25 NULL), // consumer_management_service
bartfab (slow) 2014/11/28 13:25:18 Nit: s/NULL/nullptr/ (feel free to replace the NUL
davidyu 2014/12/01 17:05:22 Done.
25 was_start_enrollment_called_(false), 26 was_start_enrollment_called_(false),
26 enrollment_status_(EnrollmentStatus::ForStatus( 27 enrollment_status_(EnrollmentStatus::ForStatus(
27 EnrollmentStatus::STATUS_SUCCESS)) { 28 EnrollmentStatus::STATUS_SUCCESS)) {
28 } 29 }
29 30
30 void FakeDeviceCloudPolicyInitializer::Init() { 31 void FakeDeviceCloudPolicyInitializer::Init() {
31 } 32 }
32 33
33 void FakeDeviceCloudPolicyInitializer::Shutdown() { 34 void FakeDeviceCloudPolicyInitializer::Shutdown() {
34 } 35 }
35 36
36 void FakeDeviceCloudPolicyInitializer::StartEnrollment( 37 void FakeDeviceCloudPolicyInitializer::StartEnrollment(
37 enterprise_management::PolicyData::ManagementMode management_mode, 38 enterprise_management::PolicyData::ManagementMode management_mode,
38 DeviceManagementService* device_management_service, 39 DeviceManagementService* device_management_service,
39 const std::string& auth_token, 40 const std::string& auth_token,
40 bool is_auto_enrollment, 41 bool is_auto_enrollment,
41 const AllowedDeviceModes& allowed_modes, 42 const AllowedDeviceModes& allowed_modes,
42 const EnrollmentCallback& enrollment_callback) { 43 const EnrollmentCallback& enrollment_callback) {
43 was_start_enrollment_called_ = true; 44 was_start_enrollment_called_ = true;
44 enrollment_callback.Run(enrollment_status_); 45 enrollment_callback.Run(enrollment_status_);
45 } 46 }
46 47
47 } // namespace policy 48 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698