OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/ui/webui/chromeos/login/demo_mode_detector.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/demo_mode_detector.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/prefs/pref_registry_simple.h" | |
9 #include "base/prefs/pref_service.h" | |
10 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
11 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
12 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 11 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
14 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
15 #include "chromeos/chromeos_switches.h" | 13 #include "chromeos/chromeos_switches.h" |
| 14 #include "components/prefs/pref_registry_simple.h" |
| 15 #include "components/prefs/pref_service.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 const int kDerelectDetectionTimeoutSeconds = 8 * 60 * 60; // 8 hours. | 18 const int kDerelectDetectionTimeoutSeconds = 8 * 60 * 60; // 8 hours. |
19 const int kDerelectIdleTimeoutSeconds = 5 * 60; // 5 minutes. | 19 const int kDerelectIdleTimeoutSeconds = 5 * 60; // 5 minutes. |
20 const int kOobeTimerUpdateIntervalSeconds = 5 * 60; // 5 minutes. | 20 const int kOobeTimerUpdateIntervalSeconds = 5 * 60; // 5 minutes. |
21 } // namespace | 21 } // namespace |
22 | 22 |
23 namespace chromeos { | 23 namespace chromeos { |
24 | 24 |
25 DemoModeDetector::DemoModeDetector() | 25 DemoModeDetector::DemoModeDetector() |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 std::max(std::min(oobe_timer_update_interval_, | 152 std::max(std::min(oobe_timer_update_interval_, |
153 derelict_detection_timeout_ - time_on_oobe_), | 153 derelict_detection_timeout_ - time_on_oobe_), |
154 base::TimeDelta::FromSeconds(0)); | 154 base::TimeDelta::FromSeconds(0)); |
155 } | 155 } |
156 | 156 |
157 bool DemoModeDetector::IsDerelict() { | 157 bool DemoModeDetector::IsDerelict() { |
158 return time_on_oobe_ >= derelict_detection_timeout_; | 158 return time_on_oobe_ >= derelict_detection_timeout_; |
159 } | 159 } |
160 | 160 |
161 } // namespace chromeos | 161 } // namespace chromeos |
OLD | NEW |