| 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" |
| 11 | 11 |
| 12 class CommandLine; | 12 class CommandLine; |
| 13 class GURL; | 13 class GURL; |
| 14 class Profile; | |
| 15 class PrefRegistrySimple; | 14 class PrefRegistrySimple; |
| 16 class PrefService; | 15 class PrefService; |
| 16 class Profile; |
| 17 | 17 |
| 18 namespace chromeos { | 18 namespace chromeos { |
| 19 | 19 |
| 20 class Authenticator; | 20 class Authenticator; |
| 21 class LoginDisplayHost; | 21 class LoginDisplayHost; |
| 22 class LoginStatusConsumer; | 22 class LoginStatusConsumer; |
| 23 struct UserContext; | 23 struct UserContext; |
| 24 | 24 |
| 25 class LoginUtils { | 25 class LoginUtils { |
| 26 public: | 26 public: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 41 static void RegisterPrefs(PrefRegistrySimple* registry); | 41 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 42 | 42 |
| 43 // Get LoginUtils singleton object. If it was not set before, new default | 43 // Get LoginUtils singleton object. If it was not set before, new default |
| 44 // instance will be created. | 44 // instance will be created. |
| 45 static LoginUtils* Get(); | 45 static LoginUtils* Get(); |
| 46 | 46 |
| 47 // Set LoginUtils singleton object for test purpose only! | 47 // Set LoginUtils singleton object for test purpose only! |
| 48 static void Set(LoginUtils* ptr); | 48 static void Set(LoginUtils* ptr); |
| 49 | 49 |
| 50 // Checks if the given username is whitelisted and allowed to sign-in to | 50 // Checks if the given username is whitelisted and allowed to sign-in to |
| 51 // this device. | 51 // this device. |wildcard_match| may be NULL. If it's present, it'll be set to |
| 52 static bool IsWhitelisted(const std::string& username); | 52 // true if the whitelist check was satisfied via a wildcard. |
| 53 static bool IsWhitelisted(const std::string& username, bool* wildcard_match); |
| 53 | 54 |
| 54 virtual ~LoginUtils() {} | 55 virtual ~LoginUtils() {} |
| 55 | 56 |
| 56 // Thin wrapper around StartupBrowserCreator::LaunchBrowser(). Meant to be | 57 // Thin wrapper around StartupBrowserCreator::LaunchBrowser(). Meant to be |
| 57 // used in a Task posted to the UI thread. Once the browser is launched the | 58 // used in a Task posted to the UI thread. Once the browser is launched the |
| 58 // login host is deleted. | 59 // login host is deleted. |
| 59 virtual void DoBrowserLaunch(Profile* profile, | 60 virtual void DoBrowserLaunch(Profile* profile, |
| 60 LoginDisplayHost* login_host) = 0; | 61 LoginDisplayHost* login_host) = 0; |
| 61 | 62 |
| 62 // Loads and prepares profile for the session. Fires |delegate| in the end. | 63 // Loads and prepares profile for the session. Fires |delegate| in the end. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // Initialize RLZ. | 105 // Initialize RLZ. |
| 105 virtual void InitRlzDelayed(Profile* user_profile) = 0; | 106 virtual void InitRlzDelayed(Profile* user_profile) = 0; |
| 106 | 107 |
| 107 // Initiates process of starting CertLoader for the user_profile. | 108 // Initiates process of starting CertLoader for the user_profile. |
| 108 virtual void StartCertLoader(Profile* user_profile) = 0; | 109 virtual void StartCertLoader(Profile* user_profile) = 0; |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 } // namespace chromeos | 112 } // namespace chromeos |
| 112 | 113 |
| 113 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ | 114 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ |
| OLD | NEW |