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) {} |
39 }; | 43 }; |
40 | 44 |
41 // Get LoginUtils singleton object. If it was not set before, new default | 45 // Get LoginUtils singleton object. If it was not set before, new default |
42 // instance will be created. | 46 // instance will be created. |
43 static LoginUtils* Get(); | 47 static LoginUtils* Get(); |
44 | 48 |
45 // Set LoginUtils singleton object for test purpose only! | 49 // Set LoginUtils singleton object for test purpose only! |
46 static void Set(LoginUtils* ptr); | 50 static void Set(LoginUtils* ptr); |
47 | 51 |
48 // Checks if the given username is whitelisted and allowed to sign-in to | 52 // 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... |
109 virtual void StartSignedInServices( | 113 virtual void StartSignedInServices( |
110 Profile* profile, | 114 Profile* profile, |
111 const GaiaAuthConsumer::ClientLoginResult& credentials) = 0; | 115 const GaiaAuthConsumer::ClientLoginResult& credentials) = 0; |
112 | 116 |
113 // Stops background fetchers. | 117 // Stops background fetchers. |
114 virtual void StopBackgroundFetchers() = 0; | 118 virtual void StopBackgroundFetchers() = 0; |
115 | 119 |
116 // Initialize RLZ. | 120 // Initialize RLZ. |
117 virtual void InitRlzDelayed(Profile* user_profile) = 0; | 121 virtual void InitRlzDelayed(Profile* user_profile) = 0; |
118 | 122 |
| 123 // Completed profile creation process. |
| 124 virtual void CompleteProfileCreate(Profile* user_profile) {} |
| 125 |
119 protected: | 126 protected: |
120 friend class ::BrowserGuestSessionNavigatorTest; | 127 friend class ::BrowserGuestSessionNavigatorTest; |
121 | 128 |
122 // Returns command line string to be used for the OTR process. Also modifies | 129 // Returns command line string to be used for the OTR process. Also modifies |
123 // given command line. | 130 // given command line. |
124 virtual std::string GetOffTheRecordCommandLine( | 131 virtual std::string GetOffTheRecordCommandLine( |
125 const GURL& start_url, | 132 const GURL& start_url, |
126 const CommandLine& base_command_line, | 133 const CommandLine& base_command_line, |
127 CommandLine* command_line) = 0; | 134 CommandLine* command_line) = 0; |
128 }; | 135 }; |
129 | 136 |
130 } // namespace chromeos | 137 } // namespace chromeos |
131 | 138 |
132 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ | 139 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ |
OLD | NEW |