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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2946813002: Bookmark disappear first when closing browser (Closed)
Patch Set: Created 3 years, 6 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 | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 290e38693b513050bc763a090611af2f7ffdcaf3..8901af64f85cca215d60f5205500d939179a8f7d 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -2247,8 +2247,11 @@ void BrowserView::SetBookmarkBarParent(views::View* new_parent) {
new_parent->AddChildViewAt(bookmark_bar_view_.get(), 0);
} else {
DCHECK(!new_parent);
- // Bookmark bar is being detached from all views because it is hidden.
- bookmark_bar_view_->parent()->RemoveChildView(bookmark_bar_view_.get());
+ if (bookmark_bar_view_->get_bookmark_bar_state() ==
+ BookmarkBar::State::HIDDEN) {
+ // Bookmark bar is being detached from all views if it is hidden.
+ bookmark_bar_view_->parent()->RemoveChildView(bookmark_bar_view_.get());
+ }
}
}
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698