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

Unified Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 2824036: Removes debugging code added in hopes of finding crasher. The crash (Closed)
Patch Set: Created 10 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/views/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/views/bookmark_bar_view.cc
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index e5955291362394d3b74fde26f6468615ba66bbc6..8c7deebc07025ba7e66656e814cdd06b28cc481d 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -953,9 +953,9 @@ MenuButton* BookmarkBarView::CreateOverflowButton() {
void BookmarkBarView::Loaded(BookmarkModel* model) {
volatile int button_count = GetBookmarkButtonCount();
- CHECK(button_count == 0); // If non-zero it means Load was invoked more than
- // once, or we didn't properly clear things. Either
- // of which shouldn't happen
+ DCHECK(button_count == 0); // If non-zero it means Load was invoked more than
+ // once, or we didn't properly clear things.
+ // Either of which shouldn't happen
const BookmarkNode* node = model_->GetBookmarkBarNode();
DCHECK(node && model_->other_node());
// Create a button for each of the children on the bookmark bar.
@@ -966,8 +966,6 @@ void BookmarkBarView::Loaded(BookmarkModel* model) {
Layout();
SchedulePaint();
-
- CheckIntegrity();
}
void BookmarkBarView::BookmarkModelBeingDeleted(BookmarkModel* model) {
@@ -988,14 +986,12 @@ void BookmarkBarView::BookmarkNodeMoved(BookmarkModel* model,
int new_index) {
BookmarkNodeRemovedImpl(model, old_parent, old_index);
BookmarkNodeAddedImpl(model, new_parent, new_index);
- CheckIntegrity();
}
void BookmarkBarView::BookmarkNodeAdded(BookmarkModel* model,
const BookmarkNode* parent,
int index) {
BookmarkNodeAddedImpl(model, parent, index);
- CheckIntegrity();
}
void BookmarkBarView::BookmarkNodeAddedImpl(BookmarkModel* model,
@@ -1022,7 +1018,6 @@ void BookmarkBarView::BookmarkNodeRemoved(BookmarkModel* model,
int old_index,
const BookmarkNode* node) {
BookmarkNodeRemovedImpl(model, parent, old_index);
- CheckIntegrity();
}
void BookmarkBarView::BookmarkNodeRemovedImpl(BookmarkModel* model,
@@ -1049,7 +1044,6 @@ void BookmarkBarView::BookmarkNodeChanged(BookmarkModel* model,
const BookmarkNode* node) {
NotifyModelChanged();
BookmarkNodeChangedImpl(model, node);
- CheckIntegrity();
}
void BookmarkBarView::BookmarkNodeChangedImpl(BookmarkModel* model,
@@ -1092,8 +1086,6 @@ void BookmarkBarView::BookmarkNodeChildrenReordered(BookmarkModel* model,
Layout();
SchedulePaint();
-
- CheckIntegrity();
}
void BookmarkBarView::BookmarkNodeFavIconLoaded(BookmarkModel* model,
@@ -1131,8 +1123,6 @@ int BookmarkBarView::GetDragOperations(View* sender, const gfx::Point& p) {
return DragDropTypes::DRAG_NONE;
}
- CheckIntegrity();
-
for (int i = 0; i < GetBookmarkButtonCount(); ++i) {
if (sender == GetBookmarkButton(i)) {
return bookmark_utils::BookmarkDragOperation(
@@ -1740,13 +1730,3 @@ views::TextButton* BookmarkBarView::CreateSyncErrorButton() {
*ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING));
return sync_error_button;
}
-
-void BookmarkBarView::CheckIntegrity() {
- // We better be on the ui thread.
- CHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
-
- // And the number of views on the bookmark bar better match that of the model.
- volatile int model_count = model_->GetBookmarkBarNode()->GetChildCount();
- volatile int view_count = GetBookmarkButtonCount();
- CHECK_EQ(model_count, view_count);
-}
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698