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

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

Issue 2444383008: session_manager: Create ChromeSessionManager early (Closed)
Patch Set: for #4 Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/browser_process_platform_part_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/threading/non_thread_safe.h" 12 #include "base/threading/non_thread_safe.h"
13 #include "chrome/browser/browser_process_platform_part_base.h" 13 #include "chrome/browser/browser_process_platform_part_base.h"
14 14
15 namespace base {
16 class CommandLine;
17 }
18
19 namespace chromeos { 15 namespace chromeos {
16 class ChromeSessionManager;
20 class ChromeUserManager; 17 class ChromeUserManager;
21 class ProfileHelper; 18 class ProfileHelper;
22 class TimeZoneResolver; 19 class TimeZoneResolver;
23 } 20 }
24 21
25 namespace chromeos { 22 namespace chromeos {
26 namespace system { 23 namespace system {
27 class AutomaticRebootManager; 24 class AutomaticRebootManager;
28 class DeviceDisablingManager; 25 class DeviceDisablingManager;
29 class DeviceDisablingManagerDefaultDelegate; 26 class DeviceDisablingManagerDefaultDelegate;
30 class SystemClock; 27 class SystemClock;
31 class TimeZoneResolverManager; 28 class TimeZoneResolverManager;
32 } 29 }
33 } 30 }
34 31
35 namespace policy { 32 namespace policy {
36 class BrowserPolicyConnector; 33 class BrowserPolicyConnector;
37 class BrowserPolicyConnectorChromeOS; 34 class BrowserPolicyConnectorChromeOS;
38 } 35 }
39 36
40 namespace session_manager {
41 class SessionManager;
42 }
43
44 class Profile;
45 class ScopedKeepAlive; 37 class ScopedKeepAlive;
46 38
47 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase, 39 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase,
48 public base::NonThreadSafe { 40 public base::NonThreadSafe {
49 public: 41 public:
50 BrowserProcessPlatformPart(); 42 BrowserProcessPlatformPart();
51 ~BrowserProcessPlatformPart() override; 43 ~BrowserProcessPlatformPart() override;
52 44
53 void InitializeAutomaticRebootManager(); 45 void InitializeAutomaticRebootManager();
54 void ShutdownAutomaticRebootManager(); 46 void ShutdownAutomaticRebootManager();
55 47
56 void InitializeChromeUserManager(); 48 void InitializeChromeUserManager();
57 void DestroyChromeUserManager(); 49 void DestroyChromeUserManager();
58 50
59 void InitializeDeviceDisablingManager(); 51 void InitializeDeviceDisablingManager();
60 void ShutdownDeviceDisablingManager(); 52 void ShutdownDeviceDisablingManager();
61 53
62 void InitializeSessionManager(const base::CommandLine& parsed_command_line, 54 void InitializeSessionManager();
63 Profile* profile,
64 bool is_running_test);
65 void ShutdownSessionManager(); 55 void ShutdownSessionManager();
66 56
67 // Disable the offline interstitial easter egg if the device is enterprise 57 // Disable the offline interstitial easter egg if the device is enterprise
68 // enrolled. 58 // enrolled.
69 void DisableDinoEasterEggIfEnrolled(); 59 void DisableDinoEasterEggIfEnrolled();
70 60
71 // Returns the SessionManager instance that is used to initialize and
72 // start user sessions as well as responsible on launching pre-session UI like
73 // out-of-box or login.
74 virtual session_manager::SessionManager* SessionManager();
75
76 // Used to register a KeepAlive when Ash is initialized, and release it 61 // Used to register a KeepAlive when Ash is initialized, and release it
77 // when until Chrome starts exiting. Ensure we stay running the whole time. 62 // when until Chrome starts exiting. Ensure we stay running the whole time.
78 void RegisterKeepAlive(); 63 void RegisterKeepAlive();
79 void UnregisterKeepAlive(); 64 void UnregisterKeepAlive();
80 65
81 // Returns the ProfileHelper instance that is used to identify 66 // Returns the ProfileHelper instance that is used to identify
82 // users and their profiles in Chrome OS multi user session. 67 // users and their profiles in Chrome OS multi user session.
83 chromeos::ProfileHelper* profile_helper(); 68 chromeos::ProfileHelper* profile_helper();
84 69
85 chromeos::system::AutomaticRebootManager* automatic_reboot_manager() { 70 chromeos::system::AutomaticRebootManager* automatic_reboot_manager() {
86 return automatic_reboot_manager_.get(); 71 return automatic_reboot_manager_.get();
87 } 72 }
88 73
89 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos(); 74 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos();
90 75
76 chromeos::ChromeSessionManager* session_manager() {
77 return session_manager_.get();
78 }
79
91 chromeos::ChromeUserManager* user_manager() { 80 chromeos::ChromeUserManager* user_manager() {
92 return chrome_user_manager_.get(); 81 return chrome_user_manager_.get();
93 } 82 }
94 83
95 chromeos::system::DeviceDisablingManager* device_disabling_manager() { 84 chromeos::system::DeviceDisablingManager* device_disabling_manager() {
96 return device_disabling_manager_.get(); 85 return device_disabling_manager_.get();
97 } 86 }
98 87
99 chromeos::system::TimeZoneResolverManager* GetTimezoneResolverManager(); 88 chromeos::system::TimeZoneResolverManager* GetTimezoneResolverManager();
100 89
101 chromeos::TimeZoneResolver* GetTimezoneResolver(); 90 chromeos::TimeZoneResolver* GetTimezoneResolver();
102 91
103 // Overridden from BrowserProcessPlatformPartBase: 92 // Overridden from BrowserProcessPlatformPartBase:
104 void StartTearDown() override; 93 void StartTearDown() override;
105 94
106 std::unique_ptr<policy::BrowserPolicyConnector> CreateBrowserPolicyConnector() 95 std::unique_ptr<policy::BrowserPolicyConnector> CreateBrowserPolicyConnector()
107 override; 96 override;
108 97
109 chromeos::system::SystemClock* GetSystemClock(); 98 chromeos::system::SystemClock* GetSystemClock();
110 void DestroySystemClock(); 99 void DestroySystemClock();
111 100
112 private: 101 private:
113 void CreateProfileHelper(); 102 void CreateProfileHelper();
114 103
115 std::unique_ptr<session_manager::SessionManager> session_manager_; 104 std::unique_ptr<chromeos::ChromeSessionManager> session_manager_;
116 105
117 bool created_profile_helper_; 106 bool created_profile_helper_;
118 std::unique_ptr<chromeos::ProfileHelper> profile_helper_; 107 std::unique_ptr<chromeos::ProfileHelper> profile_helper_;
119 108
120 std::unique_ptr<chromeos::system::AutomaticRebootManager> 109 std::unique_ptr<chromeos::system::AutomaticRebootManager>
121 automatic_reboot_manager_; 110 automatic_reboot_manager_;
122 111
123 std::unique_ptr<chromeos::ChromeUserManager> chrome_user_manager_; 112 std::unique_ptr<chromeos::ChromeUserManager> chrome_user_manager_;
124 113
125 std::unique_ptr<chromeos::system::DeviceDisablingManagerDefaultDelegate> 114 std::unique_ptr<chromeos::system::DeviceDisablingManagerDefaultDelegate>
126 device_disabling_manager_delegate_; 115 device_disabling_manager_delegate_;
127 std::unique_ptr<chromeos::system::DeviceDisablingManager> 116 std::unique_ptr<chromeos::system::DeviceDisablingManager>
128 device_disabling_manager_; 117 device_disabling_manager_;
129 118
130 std::unique_ptr<chromeos::system::TimeZoneResolverManager> 119 std::unique_ptr<chromeos::system::TimeZoneResolverManager>
131 timezone_resolver_manager_; 120 timezone_resolver_manager_;
132 std::unique_ptr<chromeos::TimeZoneResolver> timezone_resolver_; 121 std::unique_ptr<chromeos::TimeZoneResolver> timezone_resolver_;
133 122
134 std::unique_ptr<chromeos::system::SystemClock> system_clock_; 123 std::unique_ptr<chromeos::system::SystemClock> system_clock_;
135 124
136 std::unique_ptr<ScopedKeepAlive> keep_alive_; 125 std::unique_ptr<ScopedKeepAlive> keep_alive_;
137 126
138 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart); 127 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart);
139 }; 128 };
140 129
141 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ 130 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_process_platform_part_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698