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/chromeos/logging.h" | 10 #include "base/chromeos/logging.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/sys_info.h" | 14 #include "base/sys_info.h" |
15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "chromeos/dbus/power_manager_client.h" | 17 #include "chromeos/dbus/power_manager_client.h" |
18 #include "policy/proto/device_management_backend.pb.h" | 18 #include "components/policy/proto/device_management_backend.pb.h" |
19 | 19 |
20 namespace policy { | 20 namespace policy { |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 // Determines the time, measured from the time of issue, after which the command | 24 // Determines the time, measured from the time of issue, after which the command |
25 // queue will consider this command expired if the command has not been started. | 25 // queue will consider this command expired if the command has not been started. |
26 const int kCommandExpirationTimeInMinutes = 10; | 26 const int kCommandExpirationTimeInMinutes = 10; |
27 | 27 |
28 } // namespace | 28 } // namespace |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 CHROMEOS_SYSLOG(WARNING) << "Rebooting immediately."; | 70 CHROMEOS_SYSLOG(WARNING) << "Rebooting immediately."; |
71 power_manager_client_->RequestRestart(); | 71 power_manager_client_->RequestRestart(); |
72 } | 72 } |
73 | 73 |
74 base::TimeDelta DeviceCommandRebootJob::GetCommmandTimeout() const { | 74 base::TimeDelta DeviceCommandRebootJob::GetCommmandTimeout() const { |
75 return base::TimeDelta::FromMinutes(kCommandExpirationTimeInMinutes); | 75 return base::TimeDelta::FromMinutes(kCommandExpirationTimeInMinutes); |
76 } | 76 } |
77 | 77 |
78 } // namespace policy | 78 } // namespace policy |
OLD | NEW |