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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 205963005: Delete "shutdown without closing browsers" path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« ash/shell_delegate.h ('K') | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 other_bookmarked_button_->SetText(model_->other_node()->GetTitle()); 988 other_bookmarked_button_->SetText(model_->other_node()->GetTitle());
989 UpdateColors(); 989 UpdateColors();
990 UpdateOtherBookmarksVisibility(); 990 UpdateOtherBookmarksVisibility();
991 other_bookmarked_button_->SetEnabled(true); 991 other_bookmarked_button_->SetEnabled(true);
992 992
993 Layout(); 993 Layout();
994 SchedulePaint(); 994 SchedulePaint();
995 } 995 }
996 996
997 void BookmarkBarView::BookmarkModelBeingDeleted(BookmarkModel* model) { 997 void BookmarkBarView::BookmarkModelBeingDeleted(BookmarkModel* model) {
998 // In normal shutdown The bookmark model should never be deleted before us. 998 NOTREACHED();
Albert Bodenhamer 2014/03/23 01:38:36 It doesn't make sense to have a NOTREACHED() follo
oshima 2014/03/23 04:07:35 This method should not be called in normal path, a
Albert Bodenhamer 2014/03/24 02:22:42 Isn't NOTREACHED basically a DCHECK? I thought the
999 // When X exits suddenly though, it can happen, This code exists
1000 // to check for regressions in shutdown code and not crash.
1001 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers())
1002 NOTREACHED();
1003
1004 // Do minimal cleanup, presumably we'll be deleted shortly. 999 // Do minimal cleanup, presumably we'll be deleted shortly.
1005 model_->RemoveObserver(this); 1000 model_->RemoveObserver(this);
1006 model_ = NULL; 1001 model_ = NULL;
1007 } 1002 }
1008 1003
1009 void BookmarkBarView::BookmarkNodeMoved(BookmarkModel* model, 1004 void BookmarkBarView::BookmarkNodeMoved(BookmarkModel* model,
1010 const BookmarkNode* old_parent, 1005 const BookmarkNode* old_parent,
1011 int old_index, 1006 int old_index,
1012 const BookmarkNode* new_parent, 1007 const BookmarkNode* new_parent,
1013 int new_index) { 1008 int new_index) {
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 DCHECK(apps_page_shortcut_); 1850 DCHECK(apps_page_shortcut_);
1856 // Only perform layout if required. 1851 // Only perform layout if required.
1857 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( 1852 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar(
1858 browser_->profile(), browser_->host_desktop_type()); 1853 browser_->profile(), browser_->host_desktop_type());
1859 if (apps_page_shortcut_->visible() == visible) 1854 if (apps_page_shortcut_->visible() == visible)
1860 return; 1855 return;
1861 apps_page_shortcut_->SetVisible(visible); 1856 apps_page_shortcut_->SetVisible(visible);
1862 UpdateBookmarksSeparatorVisibility(); 1857 UpdateBookmarksSeparatorVisibility();
1863 Layout(); 1858 Layout();
1864 } 1859 }
OLDNEW
« ash/shell_delegate.h ('K') | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698