Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3318)

Unified Diff: chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc

Issue 151503006: Re-land r248110 with ASAN error fixed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
diff --git a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
index 8d73906446dfe8ce6595f2279f802854edc1e979..de327eced40eb37b65b72f71bb1a655e65084ca5 100644
--- a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
+++ b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
@@ -105,7 +105,7 @@ bool PasswordGenerationPopupControllerImpl::HandleKeyPressEvent(
return true;
case ui::VKEY_RETURN:
case ui::VKEY_TAB:
- // We supress tab if the password is selected because we will
+ // We suppress tab if the password is selected because we will
// automatically advance focus anyway.
return PossiblyAcceptPassword();
default:
@@ -114,10 +114,12 @@ bool PasswordGenerationPopupControllerImpl::HandleKeyPressEvent(
}
bool PasswordGenerationPopupControllerImpl::PossiblyAcceptPassword() {
- if (password_selected_)
- PasswordAccepted();
+ if (password_selected_) {
+ PasswordAccepted(); // This will delete |this|
Evan Stade 2014/01/31 22:39:57 nit: final punctuation.
Garrett Casto 2014/01/31 22:58:00 Done.
+ return true;
+ }
- return password_selected_;
+ return false;
}
void PasswordGenerationPopupControllerImpl::PasswordSelected(bool selected) {
@@ -207,6 +209,10 @@ void PasswordGenerationPopupControllerImpl::Show() {
observer_->OnPopupShown();
}
+void PasswordGenerationPopupControllerImpl::HideAndDestroy() {
+ Hide();
+}
+
void PasswordGenerationPopupControllerImpl::Hide() {
controller_common_.RemoveKeyPressCallback();

Powered by Google App Engine
This is Rietveld 408576698