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

Unified Diff: chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc

Issue 2409713002: Don't clear controller_ in ExtensionInstalledBubbleView::CloseBubble. (Closed)
Patch Set: check Created 4 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
index 85331a2314e33042bda8588e73a22e6ae9e7ca33..f5202d99cc40de4d1bdee5d6f817520b7c19d090 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
@@ -157,7 +157,9 @@ void ExtensionInstalledBubbleView::UpdateAnchorView() {
}
void ExtensionInstalledBubbleView::CloseBubble() {
- if (controller_ && controller_->anchor_position() ==
+ // This function should only be called once.
+ CHECK(!GetWidget()->IsClosed());
+ if (controller_->anchor_position() ==
ExtensionInstalledBubble::ANCHOR_PAGE_ACTION) {
BrowserView* browser_view =
BrowserView::GetBrowserViewForBrowser(browser());
@@ -166,7 +168,6 @@ void ExtensionInstalledBubbleView::CloseBubble() {
->GetPageAction(*controller_->extension()),
false); // preview_enabled
}
- controller_ = nullptr;
GetWidget()->Close();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698