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

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

Issue 842503002: Merge to branch 2214 [Password Generation] Hide popup if view can not be created. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2214
Patch Set: Created 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/password_generation_popup_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 05f7f9881bb3780ca1067e6f44ad403c3e057f2f..07d6da0cf0581aff88867263e579b64958110770 100644
--- a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
+++ b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
@@ -182,6 +182,13 @@ void PasswordGenerationPopupControllerImpl::Show(bool display_password) {
if (!view_) {
view_ = PasswordGenerationPopupView::Create(this);
+
+ // Treat popup as being hidden if creation fails.
+ if (!view_) {
+ Hide();
+ return;
+ }
+
CalculateBounds();
view_->Show();
} else {
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/password_generation_popup_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698