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
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_CHROMEOS_POLICY_FAKE_DEVICE_CLOUD_POLICY_INITIALIZER_H_
6#define CHROME_BROWSER_CHROMEOS_POLICY_FAKE_DEVICE_CLOUD_POLICY_INITIALIZER_H_
7
8#include <string>
9
10#include "base/compiler_specific.h"
11#include "base/macros.h"
12#include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h"
13#include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h"
14#include "policy/proto/device_management_backend.pb.h"
15
16namespace policy {
17
18class DeviceManagementService;
19
20class FakeDeviceCloudPolicyInitializer : public DeviceCloudPolicyInitializer {
21 public:
22  FakeDeviceCloudPolicyInitializer();
23
24  virtual void Init() OVERRIDE;
25  virtual void Shutdown() OVERRIDE;
26
27  virtual void StartEnrollment(
28      enterprise_management::PolicyData::ManagementMode management_mode,
29      DeviceManagementService* device_management_service,
30      const std::string& auth_token,
31      bool is_auto_enrollment,
32      const AllowedDeviceModes& allowed_modes,
33      const EnrollmentCallback& enrollment_callback) OVERRIDE;
34
35  bool was_start_enrollment_called() {
36    return was_start_enrollment_called_;
37  }
38
39  void set_enrollment_status(EnrollmentStatus status) {
40    enrollment_status_ = status;
41  }
42
43 private:
44  bool was_start_enrollment_called_;
45  EnrollmentStatus enrollment_status_;
46
47  DISALLOW_COPY_AND_ASSIGN(FakeDeviceCloudPolicyInitializer);
48};
49
50}  // namespace policy
51
52#endif  // CHROME_BROWSER_CHROMEOS_POLICY_FAKE_DEVICE_CLOUD_POLICY_INITIALIZER_H_
53