blob: 396b852367fda5fdfc94edee35a39c712ea4cb65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_POLICY_FAKE_DEVICE_CLOUD_POLICY_INITIALIZER_H_
#define CHROME_BROWSER_CHROMEOS_POLICY_FAKE_DEVICE_CLOUD_POLICY_INITIALIZER_H_
#include <string>
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h"
#include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h"
#include "policy/proto/device_management_backend.pb.h"
namespace policy {
class DeviceManagementService;
class FakeDeviceCloudPolicyInitializer : public DeviceCloudPolicyInitializer {
public:
FakeDeviceCloudPolicyInitializer();
virtual void Init() override;
virtual void Shutdown() override;
virtual void StartEnrollment(
enterprise_management::PolicyData::ManagementMode management_mode,
DeviceManagementService* device_management_service,
const std::string& auth_token,
bool is_auto_enrollment,
const AllowedDeviceModes& allowed_modes,
const EnrollmentCallback& enrollment_callback) override;
bool was_start_enrollment_called() {
return was_start_enrollment_called_;
}
void set_enrollment_status(EnrollmentStatus status) {
enrollment_status_ = status;
}
private:
bool was_start_enrollment_called_;
EnrollmentStatus enrollment_status_;
DISALLOW_COPY_AND_ASSIGN(FakeDeviceCloudPolicyInitializer);
};
} // namespace policy
#endif // CHROME_BROWSER_CHROMEOS_POLICY_FAKE_DEVICE_CLOUD_POLICY_INITIALIZER_H_
|