OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHROMEOS_LOGIN_LOGIN_UTILS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace chromeos { | 22 namespace chromeos { |
23 | 23 |
24 class Authenticator; | 24 class Authenticator; |
25 class LoginDisplayHost; | 25 class LoginDisplayHost; |
26 class LoginStatusConsumer; | 26 class LoginStatusConsumer; |
27 | 27 |
28 class LoginUtils { | 28 class LoginUtils { |
29 public: | 29 public: |
30 class Delegate { | 30 class Delegate { |
31 public: | 31 public: |
32 // Called after profile is loaded and prepared for the session. | 32 // Called after profile is loaded and prepared for the session. |
33 virtual void OnProfilePrepared(Profile* profile) = 0; | 33 virtual void OnProfilePrepared(Profile* profile) = 0; |
34 | 34 |
35 #if defined(ENABLE_RLZ) | 35 #if defined(ENABLE_RLZ) |
36 // Called after post-profile RLZ initialization. | 36 // Called after post-profile RLZ initialization. |
37 virtual void OnRlzInitialized(Profile* profile) {} | 37 virtual void OnRlzInitialized(Profile* profile) {} |
38 #endif | 38 #endif |
39 | |
40 // Called immediately after profile is created, should be used as a test | |
41 // se | |
42 virtual void OnProfileCreated(Profile* profile) {} | |
43 }; | 39 }; |
44 | 40 |
45 // Get LoginUtils singleton object. If it was not set before, new default | 41 // Get LoginUtils singleton object. If it was not set before, new default |
46 // instance will be created. | 42 // instance will be created. |
47 static LoginUtils* Get(); | 43 static LoginUtils* Get(); |
48 | 44 |
49 // Set LoginUtils singleton object for test purpose only! | 45 // Set LoginUtils singleton object for test purpose only! |
50 static void Set(LoginUtils* ptr); | 46 static void Set(LoginUtils* ptr); |
51 | 47 |
52 // Checks if the given username is whitelisted and allowed to sign-in to | 48 // Checks if the given username is whitelisted and allowed to sign-in to |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 virtual void StartSignedInServices( | 109 virtual void StartSignedInServices( |
114 Profile* profile, | 110 Profile* profile, |
115 const GaiaAuthConsumer::ClientLoginResult& credentials) = 0; | 111 const GaiaAuthConsumer::ClientLoginResult& credentials) = 0; |
116 | 112 |
117 // Stops background fetchers. | 113 // Stops background fetchers. |
118 virtual void StopBackgroundFetchers() = 0; | 114 virtual void StopBackgroundFetchers() = 0; |
119 | 115 |
120 // Initialize RLZ. | 116 // Initialize RLZ. |
121 virtual void InitRlzDelayed(Profile* user_profile) = 0; | 117 virtual void InitRlzDelayed(Profile* user_profile) = 0; |
122 | 118 |
123 // Completed profile creation process. | |
124 virtual void CompleteProfileCreate(Profile* user_profile) {} | |
125 | |
126 protected: | 119 protected: |
127 friend class ::BrowserGuestSessionNavigatorTest; | 120 friend class ::BrowserGuestSessionNavigatorTest; |
128 | 121 |
129 // Returns command line string to be used for the OTR process. Also modifies | 122 // Returns command line string to be used for the OTR process. Also modifies |
130 // given command line. | 123 // given command line. |
131 virtual std::string GetOffTheRecordCommandLine( | 124 virtual std::string GetOffTheRecordCommandLine( |
132 const GURL& start_url, | 125 const GURL& start_url, |
133 const CommandLine& base_command_line, | 126 const CommandLine& base_command_line, |
134 CommandLine* command_line) = 0; | 127 CommandLine* command_line) = 0; |
135 }; | 128 }; |
136 | 129 |
137 } // namespace chromeos | 130 } // namespace chromeos |
138 | 131 |
139 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ | 132 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ |
OLD | NEW |