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

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

Issue 2276593004: Device registration using an enrollment certificate from the PCA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed constant. 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 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/ptr_util.h"
7 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
8 #include "base/sequenced_task_runner.h" 9 #include "base/sequenced_task_runner.h"
10 #include "chromeos/attestation/mock_attestation_flow.h"
9 #include "components/policy/core/common/cloud/device_management_service.h" 11 #include "components/policy/core/common/cloud/device_management_service.h"
10 12
11 namespace policy { 13 namespace policy {
12 14
13 FakeDeviceCloudPolicyInitializer::FakeDeviceCloudPolicyInitializer() 15 FakeDeviceCloudPolicyInitializer::FakeDeviceCloudPolicyInitializer()
14 : DeviceCloudPolicyInitializer( 16 : DeviceCloudPolicyInitializer(
15 NULL, // local_state 17 NULL, // local_state
16 NULL, // enterprise_service 18 NULL, // enterprise_service
17 // background_task_runner 19 // background_task_runner
18 scoped_refptr<base::SequencedTaskRunner>(NULL), 20 scoped_refptr<base::SequencedTaskRunner>(NULL),
19 NULL, // install_attributes 21 NULL, // install_attributes
20 NULL, // state_keys_broker 22 NULL, // state_keys_broker
21 NULL, // device_store 23 NULL, // device_store
22 NULL, // manager 24 NULL, // manager
23 NULL, // async_caller 25 NULL, // async_caller
24 NULL), // cryptohome_client 26 base::MakeUnique<chromeos::attestation::MockAttestationFlow>()),
25 was_start_enrollment_called_(false), 27 was_start_enrollment_called_(false),
26 enrollment_status_( 28 enrollment_status_(
27 EnrollmentStatus::ForStatus(EnrollmentStatus::STATUS_SUCCESS)) {} 29 EnrollmentStatus::ForStatus(EnrollmentStatus::STATUS_SUCCESS)) {}
28 30
29 void FakeDeviceCloudPolicyInitializer::Init() { 31 void FakeDeviceCloudPolicyInitializer::Init() {
30 } 32 }
31 33
32 void FakeDeviceCloudPolicyInitializer::Shutdown() { 34 void FakeDeviceCloudPolicyInitializer::Shutdown() {
33 } 35 }
34 36
35 void FakeDeviceCloudPolicyInitializer::StartEnrollment( 37 void FakeDeviceCloudPolicyInitializer::StartEnrollment(
36 DeviceManagementService* device_management_service, 38 DeviceManagementService* device_management_service,
37 const EnrollmentConfig& enrollment_config, 39 const EnrollmentConfig& enrollment_config,
38 const std::string& auth_token, 40 const std::string& auth_token,
39 const AllowedDeviceModes& allowed_modes, 41 const AllowedDeviceModes& allowed_modes,
40 const EnrollmentCallback& enrollment_callback) { 42 const EnrollmentCallback& enrollment_callback) {
41 was_start_enrollment_called_ = true; 43 was_start_enrollment_called_ = true;
42 enrollment_callback.Run(enrollment_status_); 44 enrollment_callback.Run(enrollment_status_);
43 } 45 }
44 46
45 } // namespace policy 47 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc ('k') | components/policy/core/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698