cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / chrome / browser / chromeos / policy / remote_commands / device_command_reboot_job.h
blob711ec3d086328c975a488baa2f4217f0c05c5411
1 // Copyright 2015 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.
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_REMOTE_COMMANDS_DEVICE_COMMAND_REBOOT_JOB_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_REMOTE_COMMANDS_DEVICE_COMMAND_REBOOT_JOB_H_
8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
10 #include "base/timer/timer.h"
11 #include "components/policy/core/common/remote_commands/remote_command_job.h"
13 namespace chromeos {
15 class PowerManagerClient;
17 } // namespace chromeos
19 namespace policy {
21 class DeviceCommandRebootJob : public RemoteCommandJob {
22 public:
23 explicit DeviceCommandRebootJob(
24 chromeos::PowerManagerClient* power_manager_client);
25 ~DeviceCommandRebootJob() override;
27 // RemoteCommandJob:
28 enterprise_management::RemoteCommand_Type GetType() const override;
30 private:
31 // RemoteCommandJob:
32 bool IsExpired(base::TimeTicks now) override;
33 void RunImpl(const CallbackWithResult& succeeded_callback,
34 const CallbackWithResult& failed_callback) override;
35 void TerminateImpl() override;
36 base::TimeDelta GetCommmandTimeout() const override;
38 void Reboot() const;
40 chromeos::PowerManagerClient* power_manager_client_;
42 base::OneShotTimer<DeviceCommandRebootJob> reboot_timer_;
44 base::WeakPtrFactory<DeviceCommandRebootJob> weak_ptr_factory_;
46 DISALLOW_COPY_AND_ASSIGN(DeviceCommandRebootJob);
49 } // namespace policy
51 #endif // CHROME_BROWSER_CHROMEOS_POLICY_REMOTE_COMMANDS_DEVICE_COMMAND_REBOOT_JOB_H_