| OLD | NEW |
| 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 | |
| 18 // background_task_runner | 17 // background_task_runner |
| 19 scoped_refptr<base::SequencedTaskRunner>(NULL), | 18 scoped_refptr<base::SequencedTaskRunner>(NULL), |
| 20 NULL, // install_attributes | 19 NULL, // install_attributes |
| 21 NULL, // state_keys_broker | 20 NULL, // state_keys_broker |
| 22 NULL, // device_store | 21 NULL, // device_store |
| 23 NULL), // manager | 22 NULL), // manager |
| 24 was_start_enrollment_called_(false), | 23 was_start_enrollment_called_(false), |
| 25 enrollment_status_(EnrollmentStatus::ForStatus( | 24 enrollment_status_(EnrollmentStatus::ForStatus( |
| 26 EnrollmentStatus::STATUS_SUCCESS)) { | 25 EnrollmentStatus::STATUS_SUCCESS)) { |
| 27 } | 26 } |
| 28 | 27 |
| 29 void FakeDeviceCloudPolicyInitializer::Init() { | 28 void FakeDeviceCloudPolicyInitializer::Init() { |
| 30 } | 29 } |
| 31 | 30 |
| 32 void FakeDeviceCloudPolicyInitializer::Shutdown() { | 31 void FakeDeviceCloudPolicyInitializer::Shutdown() { |
| 33 } | 32 } |
| 34 | 33 |
| 35 void FakeDeviceCloudPolicyInitializer::StartEnrollment( | 34 void FakeDeviceCloudPolicyInitializer::StartEnrollment( |
| 36 ManagementMode management_mode, | |
| 37 DeviceManagementService* device_management_service, | 35 DeviceManagementService* device_management_service, |
| 38 chromeos::OwnerSettingsServiceChromeOS* owner_settings_service, | |
| 39 const EnrollmentConfig& enrollment_config, | 36 const EnrollmentConfig& enrollment_config, |
| 40 const std::string& auth_token, | 37 const std::string& auth_token, |
| 41 const AllowedDeviceModes& allowed_modes, | 38 const AllowedDeviceModes& allowed_modes, |
| 42 const EnrollmentCallback& enrollment_callback) { | 39 const EnrollmentCallback& enrollment_callback) { |
| 43 was_start_enrollment_called_ = true; | 40 was_start_enrollment_called_ = true; |
| 44 enrollment_callback.Run(enrollment_status_); | 41 enrollment_callback.Run(enrollment_status_); |
| 45 } | 42 } |
| 46 | 43 |
| 47 } // namespace policy | 44 } // namespace policy |
| OLD | NEW |