| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 // Set LoginUtils singleton object for test purpose only! | 41 // Set LoginUtils singleton object for test purpose only! |
| 42 static void Set(LoginUtils* ptr); | 42 static void Set(LoginUtils* ptr); |
| 43 | 43 |
| 44 // Checks if the given username is whitelisted and allowed to sign-in to | 44 // Checks if the given username is whitelisted and allowed to sign-in to |
| 45 // this device. | 45 // this device. |
| 46 static bool IsWhitelisted(const std::string& username); | 46 static bool IsWhitelisted(const std::string& username); |
| 47 | 47 |
| 48 virtual ~LoginUtils() {} | 48 virtual ~LoginUtils() {} |
| 49 | 49 |
| 50 // Thin wrapper around BrowserInit::LaunchBrowser(). Meant to be used in a | 50 // Thin wrapper around StartupBrowserCreator::LaunchBrowser(). Meant to be |
| 51 // Task posted to the UI thread. Once the browser is launched the login | 51 // used in a Task posted to the UI thread. Once the browser is launched the |
| 52 // host is deleted. | 52 // login host is deleted. |
| 53 virtual void DoBrowserLaunch(Profile* profile, | 53 virtual void DoBrowserLaunch(Profile* profile, |
| 54 LoginDisplayHost* login_host) = 0; | 54 LoginDisplayHost* login_host) = 0; |
| 55 | 55 |
| 56 // Loads and prepares profile for the session. Fires |delegate| in the end. | 56 // Loads and prepares profile for the session. Fires |delegate| in the end. |
| 57 // If |pending_requests| is true, there's a pending online auth request. | 57 // If |pending_requests| is true, there's a pending online auth request. |
| 58 // If |display_email| is not empty, user's displayed email will be set to | 58 // If |display_email| is not empty, user's displayed email will be set to |
| 59 // this value, shown in UI. | 59 // this value, shown in UI. |
| 60 // Also see DelegateDeleted method. | 60 // Also see DelegateDeleted method. |
| 61 virtual void PrepareProfile( | 61 virtual void PrepareProfile( |
| 62 const std::string& username, | 62 const std::string& username, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // given command line. | 130 // given command line. |
| 131 virtual std::string GetOffTheRecordCommandLine( | 131 virtual std::string GetOffTheRecordCommandLine( |
| 132 const GURL& start_url, | 132 const GURL& start_url, |
| 133 const CommandLine& base_command_line, | 133 const CommandLine& base_command_line, |
| 134 CommandLine* command_line) = 0; | 134 CommandLine* command_line) = 0; |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } // namespace chromeos | 137 } // namespace chromeos |
| 138 | 138 |
| 139 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ | 139 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ |
| OLD | NEW |