summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/chromeos/login/existing_user_controller.cc2
-rw-r--r--chrome/browser/chromeos/login/user_controller.cc5
-rw-r--r--chrome/browser/chromeos/login/user_controller.h7
3 files changed, 11 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index 80a5f8b..3b51ce1 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -161,7 +161,7 @@ void ExistingUserController::OnLoginFailure(const std::string& error) {
ShowError(IDS_LOGIN_ERROR_AUTHENTICATING);
}
- controllers_[index_of_view_logging_in_]->SetPasswordEnabled(true);
+ controllers_[index_of_view_logging_in_]->ClearAndEnablePassword();
// Reenable clicking on other windows.
WmIpc::Message message(WM_IPC_MESSAGE_WM_SET_LOGIN_STATE);
diff --git a/chrome/browser/chromeos/login/user_controller.cc b/chrome/browser/chromeos/login/user_controller.cc
index 5321f8a..23215e3 100644
--- a/chrome/browser/chromeos/login/user_controller.cc
+++ b/chrome/browser/chromeos/login/user_controller.cc
@@ -117,6 +117,11 @@ void UserController::SetPasswordEnabled(bool enable) {
submit_button_->SetEnabled(enable);
}
+void UserController::ClearAndEnablePassword() {
+ password_field_->SetText(string16());
+ SetPasswordEnabled(true);
+}
+
void UserController::ButtonPressed(views::Button* sender,
const views::Event& event) {
Login();
diff --git a/chrome/browser/chromeos/login/user_controller.h b/chrome/browser/chromeos/login/user_controller.h
index 5d7cde8..61d02ec 100644
--- a/chrome/browser/chromeos/login/user_controller.h
+++ b/chrome/browser/chromeos/login/user_controller.h
@@ -50,8 +50,8 @@ class UserController : public views::ButtonListener,
const UserManager::User& user() const { return user_; }
- // Sets the enabled state of the password field to |enable|.
- void SetPasswordEnabled(bool enable);
+ // Resets password text and sets the enabled state of the password.
+ void ClearAndEnablePassword();
// Returns bounds of password field in screen coordinates.
gfx::Rect GetScreenBounds() const;
@@ -100,6 +100,9 @@ class UserController : public views::ButtonListener,
// when needed.
void SetImage(const SkBitmap& image, int desired_width, int desired_height);
+ // Sets the enabled state of the password field to |enable|.
+ void SetPasswordEnabled(bool enable);
+
// Is this the guest user?
const bool is_guest_;