OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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/remote_commands/device_command_reboot_j
ob.h" | 5 #include "chrome/browser/chromeos/policy/remote_commands/device_command_reboot_j
ob.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "base/sys_info.h" | 13 #include "base/sys_info.h" |
14 #include "base/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "chromeos/dbus/power_manager_client.h" | 16 #include "chromeos/dbus/power_manager_client.h" |
17 #include "policy/proto/device_management_backend.pb.h" | 17 #include "policy/proto/device_management_backend.pb.h" |
18 | 18 |
19 namespace policy { | 19 namespace policy { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Determines the time, measured from the time of issue, after which the command | 23 // Determines the time, measured from the time of issue, after which the command |
24 // queue will consider this command expired if the command has not been started. | 24 // queue will consider this command expired if the command has not been started. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 base::TimeDelta DeviceCommandRebootJob::GetCommmandTimeout() const { | 84 base::TimeDelta DeviceCommandRebootJob::GetCommmandTimeout() const { |
85 return base::TimeDelta::FromMinutes(kMinimumUptimeInMinutes); | 85 return base::TimeDelta::FromMinutes(kMinimumUptimeInMinutes); |
86 } | 86 } |
87 | 87 |
88 void DeviceCommandRebootJob::Reboot() const { | 88 void DeviceCommandRebootJob::Reboot() const { |
89 power_manager_client_->RequestRestart(); | 89 power_manager_client_->RequestRestart(); |
90 } | 90 } |
91 | 91 |
92 } // namespace policy | 92 } // namespace policy |
OLD | NEW |