Index: trunk/src/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h |
=================================================================== |
--- trunk/src/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h (revision 275548) |
+++ trunk/src/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h (working copy) |
@@ -44,7 +44,6 @@ |
class AuthenticatedUserEmailRetriever; |
class CaptivePortalWindowProxy; |
class CoreOobeActor; |
-class GaiaScreenHandler; |
class LocallyManagedUserCreationScreenHandler; |
class NativeWindowDelegate; |
class User; |
@@ -253,9 +252,8 @@ |
UI_STATE_ACCOUNT_PICKER, |
}; |
- friend class GaiaScreenHandler; |
+ friend class ReportDnsCacheClearedOnUIThread; |
friend class LocallyManagedUserCreationScreenHandler; |
- friend class ReportDnsCacheClearedOnUIThread; |
void ShowImpl(); |
@@ -322,6 +320,16 @@ |
const std::string& username) const OVERRIDE; |
virtual void Unlock(const std::string& user_email) OVERRIDE; |
+ // Shows signin screen after dns cache and cookie cleanup operations finish. |
+ void ShowSigninScreenIfReady(); |
+ |
+ // Tells webui to load authentication extension. |force| is used to force the |
+ // extension reloading, if it has already been loaded. |silent_load| is true |
+ // for cases when extension should be loaded in the background and it |
+ // shouldn't grab the focus. |offline| is true when offline version of the |
+ // extension should be used. |
+ void LoadAuthExtension(bool force, bool silent_load, bool offline); |
+ |
// Updates authentication extension. Called when device settings that affect |
// sign-in (allow BWSI and allow whitelist) are changed. |
void UserSettingsChanged(); |
@@ -331,7 +339,16 @@ |
void RefocusCurrentPod(); |
// WebUI message handlers. |
+ void HandleCompleteAuthentication(const std::string& email, |
+ const std::string& password, |
+ const std::string& auth_code); |
+ void HandleCompleteLogin(const std::string& typed_email, |
+ const std::string& password, |
+ bool using_saml); |
void HandleGetUsers(); |
+ void HandleUsingSAMLAPI(); |
+ void HandleScrapedPasswordCount(int password_count); |
+ void HandleScrapedPasswordVerificationFailed(); |
void HandleAuthenticateUser(const std::string& username, |
const std::string& password); |
void HandleAttemptUnlock(const std::string& username); |
@@ -351,6 +368,7 @@ |
void HandleCreateAccount(); |
void HandleAccountPickerReady(); |
void HandleWallpaperReady(); |
+ void HandleLoginWebuiReady(); |
void HandleSignOutUser(); |
void HandleOpenProxySettings(); |
void HandleLoginVisible(const std::string& source); |
@@ -368,7 +386,18 @@ |
void HandleLaunchKioskApp(const std::string& app_id, bool diagnostic_mode); |
void HandleRetrieveAuthenticatedUserEmail(double attempt_token); |
+ // Kick off cookie / local storage cleanup. |
+ void StartClearingCookies(const base::Closure& on_clear_callback); |
+ void OnCookiesCleared(base::Closure on_clear_callback); |
+ // Kick off DNS cache flushing. |
+ void StartClearingDnsCache(); |
+ void OnDnsCleared(); |
+ |
+ // Decides whether an auth extension should be pre-loaded. If it should, |
+ // pre-loads it. |
+ void MaybePreloadAuthExtension(); |
+ |
// Returns true iff |
// (i) log in is restricted to some user list, |
// (ii) all users in the restricted list are present. |
@@ -398,7 +427,8 @@ |
// Returns true if offline login is allowed. |
bool IsOfflineLoginAllowed() const; |
- bool ShouldLoadGaia() const; |
+ // Attempts login for test. |
+ void SubmitLoginFormForTest(); |
// Update current input method (namely keyboard layout) to LRU by this user. |
void SetUserInputMethod(const std::string& username); |
@@ -408,9 +438,13 @@ |
// |state| indicates that enrollment is not applicable. |
void ContinueKioskEnableFlow(policy::AutoEnrollmentState state); |
- // Shows signin. |
- void OnShowAddUser(); |
+ // Shows signin screen for |email|. |
+ void OnShowAddUser(const std::string& email); |
+ // Updates the member variable and UMA histogram indicating whether the |
+ // principals API was used during SAML login. |
+ void SetSAMLPrincipalsAPIUsed(bool api_used); |
+ |
GaiaScreenHandler::FrameState FrameState() const; |
net::Error FrameError() const; |
@@ -432,12 +466,46 @@ |
// Keeps whether screen should be shown for OOBE. |
bool oobe_ui_; |
+ // Is focus still stolen from Gaia page? |
+ bool focus_stolen_; |
+ |
+ // Has Gaia page silent load been started for the current sign-in attempt? |
+ bool gaia_silent_load_; |
+ |
+ // The active network at the moment when Gaia page was preloaded. |
+ std::string gaia_silent_load_network_; |
+ |
// Is account picker being shown for the first time. |
bool is_account_picker_showing_first_time_; |
+ // True if dns cache cleanup is done. |
+ bool dns_cleared_; |
+ |
+ // True if DNS cache task is already running. |
+ bool dns_clear_task_running_; |
+ |
+ // True if cookie jar cleanup is done. |
+ bool cookies_cleared_; |
+ |
// Network state informer used to keep signin screen up. |
scoped_refptr<NetworkStateInformer> network_state_informer_; |
+ // Email to pre-populate with. |
+ std::string email_; |
+ // Emails of the users, whose passwords have recently been changed. |
+ std::set<std::string> password_changed_for_; |
+ |
+ // If the user authenticated via SAML, this indicates whether the principals |
+ // API was used. |
+ bool using_saml_api_; |
+ |
+ // Test credentials. |
+ std::string test_user_; |
+ std::string test_pass_; |
+ bool test_expects_complete_login_; |
+ |
+ base::WeakPtrFactory<SigninScreenHandler> weak_factory_; |
+ |
// Set to true once |LOGIN_WEBUI_VISIBLE| notification is observed. |
bool webui_visible_; |
bool preferences_changed_delayed_; |
@@ -473,8 +541,6 @@ |
// Helper that retrieves the authenticated user's e-mail address. |
scoped_ptr<AuthenticatedUserEmailRetriever> email_retriever_; |
- base::WeakPtrFactory<SigninScreenHandler> weak_factory_; |
- |
DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
}; |