Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: chrome/browser/chromeos/system/automatic_reboot_manager.cc

Issue 222383002: Move UserActivityDetector from ash/wm/ to ui/wm/core/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove an unneeded include Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/system/automatic_reboot_manager.h" 5 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
11 #include <algorithm> 11 #include <algorithm>
12 #include <string> 12 #include <string>
13 13
14 #include "ash/shell.h" 14 #include "ash/shell.h"
15 #include "ash/wm/user_activity_detector.h"
16 #include "base/bind.h" 15 #include "base/bind.h"
17 #include "base/bind_helpers.h" 16 #include "base/bind_helpers.h"
18 #include "base/callback.h" 17 #include "base/callback.h"
19 #include "base/file_util.h" 18 #include "base/file_util.h"
20 #include "base/files/file_path.h" 19 #include "base/files/file_path.h"
21 #include "base/files/scoped_file.h" 20 #include "base/files/scoped_file.h"
22 #include "base/location.h" 21 #include "base/location.h"
23 #include "base/logging.h" 22 #include "base/logging.h"
24 #include "base/memory/ref_counted.h" 23 #include "base/memory/ref_counted.h"
25 #include "base/path_service.h" 24 #include "base/path_service.h"
(...skipping 11 matching lines...) Expand all
37 #include "chrome/browser/chromeos/login/user_manager.h" 36 #include "chrome/browser/chromeos/login/user_manager.h"
38 #include "chrome/browser/chromeos/system/automatic_reboot_manager_observer.h" 37 #include "chrome/browser/chromeos/system/automatic_reboot_manager_observer.h"
39 #include "chrome/common/pref_names.h" 38 #include "chrome/common/pref_names.h"
40 #include "chromeos/chromeos_paths.h" 39 #include "chromeos/chromeos_paths.h"
41 #include "chromeos/chromeos_switches.h" 40 #include "chromeos/chromeos_switches.h"
42 #include "chromeos/dbus/dbus_thread_manager.h" 41 #include "chromeos/dbus/dbus_thread_manager.h"
43 #include "content/public/browser/browser_thread.h" 42 #include "content/public/browser/browser_thread.h"
44 #include "content/public/browser/notification_details.h" 43 #include "content/public/browser/notification_details.h"
45 #include "content/public/browser/notification_service.h" 44 #include "content/public/browser/notification_service.h"
46 #include "content/public/browser/notification_source.h" 45 #include "content/public/browser/notification_source.h"
46 #include "ui/wm/core/user_activity_detector.h"
47 47
48 namespace chromeos { 48 namespace chromeos {
49 namespace system { 49 namespace system {
50 50
51 namespace { 51 namespace {
52 52
53 const int kMinRebootUptimeMs = 60 * 60 * 1000; // 1 hour. 53 const int kMinRebootUptimeMs = 60 * 60 * 1000; // 1 hour.
54 const int kLoginManagerIdleTimeoutMs = 60 * 1000; // 60 seconds. 54 const int kLoginManagerIdleTimeoutMs = 60 * 1000; // 60 seconds.
55 const int kGracePeriodMs = 24 * 60 * 60 * 1000; // 24 hours. 55 const int kGracePeriodMs = 24 * 60 * 60 * 1000; // 24 hours.
56 const int kOneKilobyte = 1 << 10; // 1 kB in bytes. 56 const int kOneKilobyte = 1 << 10; // 1 kB in bytes.
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 } 410 }
411 411
412 login_screen_idle_timer_.reset(); 412 login_screen_idle_timer_.reset();
413 grace_start_timer_.reset(); 413 grace_start_timer_.reset();
414 grace_end_timer_.reset(); 414 grace_end_timer_.reset();
415 DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); 415 DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart();
416 } 416 }
417 417
418 } // namespace system 418 } // namespace system
419 } // namespace chromeos 419 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698