summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-23 21:11:40 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-23 21:11:40 +0000
commitc610a0fc0c03cefb3ff72ac2c460ee18a98f6951 (patch)
tree37f99778bc3fd8b556cdda7643032bcc93e12b8e
parent104ff43eb01ac9b0e50b25aace950dd75af77c8b (diff)
downloadchromium_src-c610a0fc0c03cefb3ff72ac2c460ee18a98f6951.zip
chromium_src-c610a0fc0c03cefb3ff72ac2c460ee18a98f6951.tar.gz
chromium_src-c610a0fc0c03cefb3ff72ac2c460ee18a98f6951.tar.bz2
Coverity: Initialize the remaining DropInfo members in the constructor.
CID=4402 BUG=none TEST=none Review URL: http://codereview.chromium.org/227007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26984 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc21
1 files changed, 17 insertions, 4 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index ff1cbef..bf0ec9a 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -4,7 +4,10 @@
#include "chrome/browser/views/bookmark_bar_view.h"
+#include <algorithm>
#include <limits>
+#include <set>
+#include <vector>
#include "app/gfx/canvas.h"
#include "app/gfx/text_elider.h"
@@ -247,7 +250,17 @@ class BookmarkFolderButton : public views::MenuButton {
// Tracks drops on the BookmarkBarView.
struct BookmarkBarView::DropInfo {
- DropInfo() : valid(false), drop_index(-1), is_menu_showing(false) {}
+ DropInfo()
+ : valid(false),
+ drop_index(-1),
+ is_menu_showing(false),
+ drop_on(false),
+ is_over_overflow(false),
+ is_over_other(false),
+ x(0),
+ y(0),
+ drag_operation(0) {
+ }
// Whether the data is valid.
bool valid;
@@ -970,7 +983,7 @@ void BookmarkBarView::BookmarkNodeChangedImpl(BookmarkModel* model,
return;
}
int index = model_->GetBookmarkBarNode()->IndexOfChild(node);
- DCHECK(index != -1);
+ DCHECK_NE(-1, index);
views::TextButton* button = GetBookmarkButton(index);
gfx::Size old_pref = button->GetPreferredSize();
ConfigureButton(node, button);
@@ -1091,7 +1104,7 @@ void BookmarkBarView::RunMenu(views::View* view,
anchor_point = MenuItemView::TOPRIGHT;
} else {
int button_index = GetChildIndex(view);
- DCHECK(button_index != -1);
+ DCHECK_NE(-1, button_index);
node = model_->GetBookmarkBarNode()->GetChild(button_index);
// When the UI layout is RTL, the bookmarks are laid out from right to left
@@ -1130,7 +1143,7 @@ void BookmarkBarView::ButtonPressed(views::Button* sender,
node = model_->other_node();
} else {
int index = GetChildIndex(sender);
- DCHECK(index != -1);
+ DCHECK_NE(-1, index);
node = model_->GetBookmarkBarNode()->GetChild(index);
}
DCHECK(page_navigator_);