diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-16 16:50:49 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-16 16:50:49 +0000 |
commit | 5f3dc83c13bd6d7ffe0e84af3c260e610fe989ca (patch) | |
tree | 15223975212ccbeeec859b35ef8365a75670838a /chrome/browser/views/bookmark_bar_view.h | |
parent | 1dbaada05d7d6826d2da40fe7339bc10663d0db0 (diff) | |
download | chromium_src-5f3dc83c13bd6d7ffe0e84af3c260e610fe989ca.zip chromium_src-5f3dc83c13bd6d7ffe0e84af3c260e610fe989ca.tar.gz chromium_src-5f3dc83c13bd6d7ffe0e84af3c260e610fe989ca.tar.bz2 |
Fixes bug in bookmark bar view if profile changed. If the profile
changed we didn't remove the old buttons, which meant when you clicked
on a button it might be past the bounds of the model. I don't think we
ever do this, but it's the only thing I could see that could cause the
crash.
Once I've nailed this down I'll nuke the CHECKs.
BUG=44642
TEST=none
Review URL: http://codereview.chromium.org/2822010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49959 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_bar_view.h')
-rw-r--r-- | chrome/browser/views/bookmark_bar_view.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.h b/chrome/browser/views/bookmark_bar_view.h index 1aa8d1b..bb532fb 100644 --- a/chrome/browser/views/bookmark_bar_view.h +++ b/chrome/browser/views/bookmark_bar_view.h @@ -50,6 +50,14 @@ class BookmarkBarView : public DetachableToolbarView, friend class ShowFolderMenuTask; public: + // Constants used in Browser View, as well as here. + // How inset the bookmarks bar is when displayed on the new tab page. + static const int kNewtabHorizontalPadding; + static const int kNewtabVerticalPadding; + + // Maximum size of buttons on the bookmark bar. + static const int kMaxButtonWidth; + // Interface implemented by controllers/views that need to be notified any // time the model changes, typically to cancel an operation that is showing // data from the model such as a menu. This isn't intended as a general @@ -213,22 +221,19 @@ class BookmarkBarView : public DetachableToolbarView, // BookmarkBarInstructionsView::Delegate. virtual void ShowImportDialog(); - // Maximum size of buttons on the bookmark bar. - static const int kMaxButtonWidth; - // If a button is currently throbbing, it is stopped. If immediate is true // the throb stops immediately, otherwise it stops after a couple more // throbs. void StopThrobbing(bool immediate); + // Returns the number of buttons corresponding to starred urls/groups. This + // is equivalent to the number of children the bookmark bar node from the + // bookmark bar model has. + int GetBookmarkButtonCount(); + // If true we're running tests. This short circuits a couple of animations. static bool testing_; - // Constants used in Browser View, as well as here. - // How inset the bookmarks bar is when displayed on the new tab page. - static const int kNewtabHorizontalPadding; - static const int kNewtabVerticalPadding; - private: class ButtonSeparatorView; struct DropInfo; @@ -272,11 +277,6 @@ class BookmarkBarView : public DetachableToolbarView, // Creates the button used when not all bookmark buttons fit. views::MenuButton* CreateOverflowButton(); - // Returns the number of buttons corresponding to starred urls/groups. This - // is equivalent to the number of children the bookmark bar node from the - // bookmark bar model has. - int GetBookmarkButtonCount(); - // Invoked when the bookmark bar model has finished loading. Creates a button // for each of the children of the root node from the model. virtual void Loaded(BookmarkModel* model); |