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

Unified Diff: chrome/browser/ui/views/button_dropdown_test.cc

Issue 10832184: Fixed memory leak. Untangled confusing code with menu initialization and ownership. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « no previous file | chrome/browser/ui/views/toolbar_view.h » ('j') | ui/views/controls/button/button_dropdown.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/button_dropdown_test.cc
===================================================================
--- chrome/browser/ui/views/button_dropdown_test.cc (revision 150365)
+++ chrome/browser/ui/views/button_dropdown_test.cc (working copy)
@@ -15,7 +15,6 @@
public:
ButtonDropDownDragTest()
: button_(NULL),
- ALLOW_THIS_IN_INITIALIZER_LIST(menu_model_(this)),
menu_shown_(false),
menu_closed_(false) {
}
@@ -25,7 +24,7 @@
// ViewEventTestBase implementation.
virtual void SetUp() OVERRIDE {
- button_ = new views::ButtonDropDown(NULL, &menu_model_);
+ button_ = new views::ButtonDropDown(NULL, new ui::SimpleMenuModel(this));
ViewEventTestBase::SetUp();
}
@@ -125,7 +124,6 @@
private:
views::ButtonDropDown* button_;
- ui::SimpleMenuModel menu_model_;
bool menu_shown_;
bool menu_closed_;
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar_view.h » ('j') | ui/views/controls/button/button_dropdown.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698