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

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

Issue 811563004: [Password Generation] Hide popup if view can not be created. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Leak Created 6 years 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 8d174be00050aed8bdda1365f2096636ffc1b358..98a81489b270d96063e07dee1462273c11d6f267 100644
--- a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
+++ b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
@@ -177,6 +177,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