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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/demo_mode_detector.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
OLDNEW
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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "base/timer/timer.h" 14 #include "base/timer/timer.h"
15 #include "chrome/browser/chromeos/idle_detector.h" 15 #include "chrome/browser/chromeos/idle_detector.h"
16 16
17 class PrefRegistrySimple; 17 class PrefRegistrySimple;
18 18
19 namespace chromeos { 19 namespace chromeos {
20 20
21 // Helper for idle state and demo-mode detection. 21 // Helper for idle state and demo-mode detection.
(...skipping 13 matching lines...) Expand all
35 void StartIdleDetection(); 35 void StartIdleDetection();
36 void StartOobeTimer(); 36 void StartOobeTimer();
37 void OnIdle(); 37 void OnIdle();
38 void OnOobeTimerUpdate(); 38 void OnOobeTimerUpdate();
39 void SetupTimeouts(); 39 void SetupTimeouts();
40 bool IsDerelict(); 40 bool IsDerelict();
41 41
42 // Total time this machine has spent on OOBE. 42 // Total time this machine has spent on OOBE.
43 base::TimeDelta time_on_oobe_; 43 base::TimeDelta time_on_oobe_;
44 44
45 scoped_ptr<IdleDetector> idle_detector_; 45 std::unique_ptr<IdleDetector> idle_detector_;
46 46
47 base::RepeatingTimer oobe_timer_; 47 base::RepeatingTimer oobe_timer_;
48 48
49 // Timeout to detect if the machine is in a derelict state. 49 // Timeout to detect if the machine is in a derelict state.
50 base::TimeDelta derelict_detection_timeout_; 50 base::TimeDelta derelict_detection_timeout_;
51 51
52 // Timeout before showing our demo app if the machine is in a derelict state. 52 // Timeout before showing our demo app if the machine is in a derelict state.
53 base::TimeDelta derelict_idle_timeout_; 53 base::TimeDelta derelict_idle_timeout_;
54 54
55 // Time between updating our total time on oobe. 55 // Time between updating our total time on oobe.
56 base::TimeDelta oobe_timer_update_interval_; 56 base::TimeDelta oobe_timer_update_interval_;
57 57
58 bool demo_launched_; 58 bool demo_launched_;
59 59
60 base::WeakPtrFactory<DemoModeDetector> weak_ptr_factory_; 60 base::WeakPtrFactory<DemoModeDetector> weak_ptr_factory_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(DemoModeDetector); 62 DISALLOW_COPY_AND_ASSIGN(DemoModeDetector);
63 }; 63 };
64 64
65 } // namespace chromeos 65 } // namespace chromeos
66 66
67 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_ 67 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_DEMO_MODE_DETECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698