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

Side by Side Diff: chrome/browser/browser_process_platform_part_chromeos.h

Issue 1778873002: Replace Increment/DecrementKeepAliveCount by ScopedKeepAlives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KAObserver
Patch Set: replace the commented dcheck by a dlog Created 4 years, 9 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 (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 #ifndef CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_
6 #define CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ 6 #define CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 22 matching lines...) Expand all
33 namespace policy { 33 namespace policy {
34 class BrowserPolicyConnector; 34 class BrowserPolicyConnector;
35 class BrowserPolicyConnectorChromeOS; 35 class BrowserPolicyConnectorChromeOS;
36 } 36 }
37 37
38 namespace session_manager { 38 namespace session_manager {
39 class SessionManager; 39 class SessionManager;
40 } 40 }
41 41
42 class Profile; 42 class Profile;
43 class ScopedKeepAlive;
43 44
44 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase, 45 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase,
45 public base::NonThreadSafe { 46 public base::NonThreadSafe {
46 public: 47 public:
47 BrowserProcessPlatformPart(); 48 BrowserProcessPlatformPart();
48 ~BrowserProcessPlatformPart() override; 49 ~BrowserProcessPlatformPart() override;
49 50
50 void InitializeAutomaticRebootManager(); 51 void InitializeAutomaticRebootManager();
51 void ShutdownAutomaticRebootManager(); 52 void ShutdownAutomaticRebootManager();
52 53
(...skipping 10 matching lines...) Expand all
63 64
64 // Disable the offline interstitial easter egg if the device is enterprise 65 // Disable the offline interstitial easter egg if the device is enterprise
65 // enrolled. 66 // enrolled.
66 void DisableDinoEasterEggIfEnrolled(); 67 void DisableDinoEasterEggIfEnrolled();
67 68
68 // Returns the SessionManager instance that is used to initialize and 69 // Returns the SessionManager instance that is used to initialize and
69 // start user sessions as well as responsible on launching pre-session UI like 70 // start user sessions as well as responsible on launching pre-session UI like
70 // out-of-box or login. 71 // out-of-box or login.
71 virtual session_manager::SessionManager* SessionManager(); 72 virtual session_manager::SessionManager* SessionManager();
72 73
74 // Used to register a KeepAlive when Ash is initialized, and release it
75 // when until Chrome starts exiting. Ensure we stay running the whole time.
76 void RegisterKeepAlive();
77 void UnregisterKeepAlive();
78
73 // Returns the ProfileHelper instance that is used to identify 79 // Returns the ProfileHelper instance that is used to identify
74 // users and their profiles in Chrome OS multi user session. 80 // users and their profiles in Chrome OS multi user session.
75 chromeos::ProfileHelper* profile_helper(); 81 chromeos::ProfileHelper* profile_helper();
76 82
77 chromeos::system::AutomaticRebootManager* automatic_reboot_manager() { 83 chromeos::system::AutomaticRebootManager* automatic_reboot_manager() {
78 return automatic_reboot_manager_.get(); 84 return automatic_reboot_manager_.get();
79 } 85 }
80 86
81 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos(); 87 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos();
82 88
(...skipping 30 matching lines...) Expand all
113 119
114 scoped_ptr<chromeos::system::DeviceDisablingManagerDefaultDelegate> 120 scoped_ptr<chromeos::system::DeviceDisablingManagerDefaultDelegate>
115 device_disabling_manager_delegate_; 121 device_disabling_manager_delegate_;
116 scoped_ptr<chromeos::system::DeviceDisablingManager> 122 scoped_ptr<chromeos::system::DeviceDisablingManager>
117 device_disabling_manager_; 123 device_disabling_manager_;
118 124
119 scoped_ptr<chromeos::TimeZoneResolver> timezone_resolver_; 125 scoped_ptr<chromeos::TimeZoneResolver> timezone_resolver_;
120 126
121 scoped_ptr<chromeos::system::SystemClock> system_clock_; 127 scoped_ptr<chromeos::system::SystemClock> system_clock_;
122 128
129 scoped_ptr<ScopedKeepAlive> keep_alive_;
130
123 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart); 131 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart);
124 }; 132 };
125 133
126 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ 134 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/browser_process_platform_part_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698