summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-28 16:46:35 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-28 16:46:35 +0000
commit97a056463c8906c9cf430de764b1ae3b482eeeed (patch)
treec8c9a4ecfe540b3f15e0cf85a87ae52e27312d39 /chrome/browser
parentf0febe304989583b09a5b3aaa301d8bbe611a766 (diff)
downloadchromium_src-97a056463c8906c9cf430de764b1ae3b482eeeed.zip
chromium_src-97a056463c8906c9cf430de764b1ae3b482eeeed.tar.gz
chromium_src-97a056463c8906c9cf430de764b1ae3b482eeeed.tar.bz2
Get rid of BookmarkEditor::Show()'s BookmarkEditor::Handler argument.
Still to do: get rid of things which hang on to a handler just so they can pass it to Show(). BUG=38908 TEST=everything still works Review URL: http://codereview.chromium.org/1795007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45813 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/bookmarks/bookmark_context_menu_controller.cc4
-rw-r--r--chrome/browser/bookmarks/bookmark_editor.h4
-rw-r--r--chrome/browser/browser.cc2
-rw-r--r--chrome/browser/cocoa/bookmark_bar_controller.mm6
-rw-r--r--chrome/browser/cocoa/bookmark_editor_base_controller.mm8
-rw-r--r--chrome/browser/gtk/bookmark_bubble_gtk.cc2
-rw-r--r--chrome/browser/gtk/bookmark_editor_gtk.cc15
-rw-r--r--chrome/browser/gtk/bookmark_editor_gtk.h6
-rw-r--r--chrome/browser/gtk/bookmark_editor_gtk_unittest.cc18
-rw-r--r--chrome/browser/views/bookmark_bubble_view.cc2
-rw-r--r--chrome/browser/views/bookmark_context_menu_controller_views.cc4
-rw-r--r--chrome/browser/views/bookmark_editor_view.cc15
-rw-r--r--chrome/browser/views/bookmark_editor_view.h5
-rw-r--r--chrome/browser/views/bookmark_editor_view_unittest.cc27
14 files changed, 50 insertions, 68 deletions
diff --git a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc
index 4f9c140..2e3f67e 100644
--- a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc
+++ b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc
@@ -178,7 +178,7 @@ void BookmarkContextMenuController::ExecuteCommand(int id) {
editor_config = BookmarkEditor::NO_TREE;
BookmarkEditor::Show(parent_window_, profile_, parent_,
BookmarkEditor::EditDetails(selection_[0]),
- editor_config, NULL);
+ editor_config);
} else {
BookmarkFolderEditorController::Show(profile_, parent_window_,
selection_[0], -1, BookmarkFolderEditorController::NONE);
@@ -210,7 +210,7 @@ void BookmarkContextMenuController::ExecuteCommand(int id) {
BookmarkEditor::Show(
parent_window_, profile_,
bookmark_utils::GetParentForNewNodes(parent_, selection_, NULL),
- BookmarkEditor::EditDetails(), editor_config, NULL);
+ BookmarkEditor::EditDetails(), editor_config);
break;
}
diff --git a/chrome/browser/bookmarks/bookmark_editor.h b/chrome/browser/bookmarks/bookmark_editor.h
index 8b6445a..0de44bc 100644
--- a/chrome/browser/bookmarks/bookmark_editor.h
+++ b/chrome/browser/bookmarks/bookmark_editor.h
@@ -75,13 +75,11 @@ class BookmarkEditor {
// |parent| gives the initial parent to select in the tree for the node.
// |parent| is only used if |details.existing_node| is null.
// BookmarkEditor takes ownership of |handler| and deletes it when done.
- // |handler| may be null. See description of Handler for details.
static void Show(gfx::NativeWindow parent_window,
Profile* profile,
const BookmarkNode* parent,
const EditDetails& details,
- Configuration configuration,
- Handler* handler);
+ Configuration configuration);
};
#endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 7abf03d..fdb213b 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -2084,7 +2084,7 @@ void Browser::BookmarkAllTabs() {
BookmarkEditor::Show(window()->GetNativeHandle(), profile_,
model->GetParentForNewNodes(), details,
- BookmarkEditor::SHOW_TREE, NULL);
+ BookmarkEditor::SHOW_TREE);
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm
index 19025d6..1ebe272 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bar_controller.mm
@@ -1254,8 +1254,7 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
browser_->profile(),
node->GetParent(),
BookmarkEditor::EditDetails(node),
- BookmarkEditor::SHOW_TREE,
- nil);
+ BookmarkEditor::SHOW_TREE);
}
- (IBAction)cutBookmark:(id)sender {
@@ -1366,8 +1365,7 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
browser_->profile(),
parent,
BookmarkEditor::EditDetails(),
- BookmarkEditor::SHOW_TREE,
- nil);
+ BookmarkEditor::SHOW_TREE);
}
// Might be called from the context menu over the bar OR over a
diff --git a/chrome/browser/cocoa/bookmark_editor_base_controller.mm b/chrome/browser/cocoa/bookmark_editor_base_controller.mm
index 017d477..ac66f20 100644
--- a/chrome/browser/cocoa/bookmark_editor_base_controller.mm
+++ b/chrome/browser/cocoa/bookmark_editor_base_controller.mm
@@ -59,16 +59,16 @@ void BookmarkEditor::Show(gfx::NativeWindow parent_hwnd,
Profile* profile,
const BookmarkNode* parent,
const EditDetails& details,
- Configuration configuration,
- Handler* handler) {
+ Configuration configuration) {
BookmarkEditorBaseController* controller = nil;
+ // TODO(viettrungluu): get rid of |handler:| below and elsewhere.
if (details.type == EditDetails::NEW_FOLDER) {
controller = [[BookmarkAllTabsController alloc]
initWithParentWindow:parent_hwnd
profile:profile
parent:parent
configuration:configuration
- handler:handler];
+ handler:NULL];
} else {
controller = [[BookmarkEditorController alloc]
initWithParentWindow:parent_hwnd
@@ -76,7 +76,7 @@ void BookmarkEditor::Show(gfx::NativeWindow parent_hwnd,
parent:parent
node:details.existing_node
configuration:configuration
- handler:handler];
+ handler:NULL];
}
[controller runAsModalSheet];
}
diff --git a/chrome/browser/gtk/bookmark_bubble_gtk.cc b/chrome/browser/gtk/bookmark_bubble_gtk.cc
index 2bf86e2..ec57adb 100644
--- a/chrome/browser/gtk/bookmark_bubble_gtk.cc
+++ b/chrome/browser/gtk/bookmark_bubble_gtk.cc
@@ -389,6 +389,6 @@ void BookmarkBubbleGtk::ShowEditor() {
if (node) {
BookmarkEditor::Show(toplevel, profile, NULL,
BookmarkEditor::EditDetails(node),
- BookmarkEditor::SHOW_TREE, NULL);
+ BookmarkEditor::SHOW_TREE);
}
}
diff --git a/chrome/browser/gtk/bookmark_editor_gtk.cc b/chrome/browser/gtk/bookmark_editor_gtk.cc
index de717c7..dc631e5 100644
--- a/chrome/browser/gtk/bookmark_editor_gtk.cc
+++ b/chrome/browser/gtk/bookmark_editor_gtk.cc
@@ -41,12 +41,11 @@ void BookmarkEditor::Show(gfx::NativeWindow parent_hwnd,
Profile* profile,
const BookmarkNode* parent,
const EditDetails& details,
- Configuration configuration,
- Handler* handler) {
+ Configuration configuration) {
DCHECK(profile);
BookmarkEditorGtk* editor =
new BookmarkEditorGtk(parent_hwnd, profile, parent, details,
- configuration, handler);
+ configuration);
editor->Show();
}
@@ -55,15 +54,13 @@ BookmarkEditorGtk::BookmarkEditorGtk(
Profile* profile,
const BookmarkNode* parent,
const EditDetails& details,
- BookmarkEditor::Configuration configuration,
- BookmarkEditor::Handler* handler)
+ BookmarkEditor::Configuration configuration)
: profile_(profile),
dialog_(NULL),
parent_(parent),
details_(details),
running_menu_for_root_(false),
- show_tree_(configuration == SHOW_TREE),
- handler_(handler) {
+ show_tree_(configuration == SHOW_TREE) {
DCHECK(profile);
Init(window);
}
@@ -316,7 +313,7 @@ void BookmarkEditorGtk::ApplyEdits(GtkTreeIter* selected_parent) {
if (!show_tree_ || !selected_parent) {
bookmark_utils::ApplyEditsWithNoGroupChange(
- bb_model_, parent_, details_, new_title, new_url, handler_.get());
+ bb_model_, parent_, details_, new_title, new_url, NULL);
return;
}
@@ -332,7 +329,7 @@ void BookmarkEditorGtk::ApplyEdits(GtkTreeIter* selected_parent) {
}
bookmark_utils::ApplyEditsWithPossibleGroupChange(
- bb_model_, new_parent, details_, new_title, new_url, handler_.get());
+ bb_model_, new_parent, details_, new_title, new_url, NULL);
}
void BookmarkEditorGtk::AddNewGroup(GtkTreeIter* parent, GtkTreeIter* child) {
diff --git a/chrome/browser/gtk/bookmark_editor_gtk.h b/chrome/browser/gtk/bookmark_editor_gtk.h
index 8d25862..904e193 100644
--- a/chrome/browser/gtk/bookmark_editor_gtk.h
+++ b/chrome/browser/gtk/bookmark_editor_gtk.h
@@ -10,7 +10,6 @@
#include <string>
#include "app/gtk_signal.h"
-#include "base/scoped_ptr.h"
#include "chrome/browser/bookmarks/bookmark_editor.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
@@ -35,8 +34,7 @@ class BookmarkEditorGtk : public BookmarkEditor,
Profile* profile,
const BookmarkNode* parent,
const EditDetails& details,
- BookmarkEditor::Configuration configuration,
- BookmarkEditor::Handler* handler);
+ BookmarkEditor::Configuration configuration);
virtual ~BookmarkEditorGtk();
@@ -138,8 +136,6 @@ class BookmarkEditorGtk : public BookmarkEditor,
// Is the tree shown?
bool show_tree_;
- scoped_ptr<BookmarkEditor::Handler> handler_;
-
DISALLOW_COPY_AND_ASSIGN(BookmarkEditorGtk);
};
diff --git a/chrome/browser/gtk/bookmark_editor_gtk_unittest.cc b/chrome/browser/gtk/bookmark_editor_gtk_unittest.cc
index db6547b..8eba11a 100644
--- a/chrome/browser/gtk/bookmark_editor_gtk_unittest.cc
+++ b/chrome/browser/gtk/bookmark_editor_gtk_unittest.cc
@@ -97,7 +97,7 @@ class BookmarkEditorGtkTest : public testing::Test {
TEST_F(BookmarkEditorGtkTest, ModelsMatch) {
BookmarkEditorGtk editor(NULL, profile_.get(), NULL,
BookmarkEditor::EditDetails(),
- BookmarkEditor::SHOW_TREE, NULL);
+ BookmarkEditor::SHOW_TREE);
// The root should have two children, one for the bookmark bar node,
// the other for the 'other bookmarks' folder.
@@ -137,7 +137,7 @@ TEST_F(BookmarkEditorGtkTest, ModelsMatch) {
TEST_F(BookmarkEditorGtkTest, EditTitleKeepsPosition) {
BookmarkEditorGtk editor(NULL, profile_.get(), NULL,
BookmarkEditor::EditDetails(GetNode("a")),
- BookmarkEditor::SHOW_TREE, NULL);
+ BookmarkEditor::SHOW_TREE);
gtk_entry_set_text(GTK_ENTRY(editor.name_entry_), "new_a");
GtkTreeIter bookmark_bar_node;
@@ -157,7 +157,7 @@ TEST_F(BookmarkEditorGtkTest, EditURLKeepsPosition) {
Time node_time = GetNode("a")->date_added();
BookmarkEditorGtk editor(NULL, profile_.get(), NULL,
BookmarkEditor::EditDetails(GetNode("a")),
- BookmarkEditor::SHOW_TREE, NULL);
+ BookmarkEditor::SHOW_TREE);
gtk_entry_set_text(GTK_ENTRY(editor.url_entry_),
GURL(base_path() + "new_a").spec().c_str());
@@ -178,7 +178,7 @@ TEST_F(BookmarkEditorGtkTest, EditURLKeepsPosition) {
TEST_F(BookmarkEditorGtkTest, ChangeParent) {
BookmarkEditorGtk editor(NULL, profile_.get(), NULL,
BookmarkEditor::EditDetails(GetNode("a")),
- BookmarkEditor::SHOW_TREE, NULL);
+ BookmarkEditor::SHOW_TREE);
GtkTreeModel* store = GTK_TREE_MODEL(editor.tree_store_);
GtkTreeIter gtk_other_node;
@@ -197,7 +197,7 @@ TEST_F(BookmarkEditorGtkTest, ChangeParentAndURL) {
Time node_time = GetNode("a")->date_added();
BookmarkEditorGtk editor(NULL, profile_.get(), NULL,
BookmarkEditor::EditDetails(GetNode("a")),
- BookmarkEditor::SHOW_TREE, NULL);
+ BookmarkEditor::SHOW_TREE);
gtk_entry_set_text(GTK_ENTRY(editor.url_entry_),
GURL(base_path() + "new_a").spec().c_str());
@@ -218,7 +218,7 @@ TEST_F(BookmarkEditorGtkTest, ChangeParentAndURL) {
TEST_F(BookmarkEditorGtkTest, MoveToNewParent) {
BookmarkEditorGtk editor(NULL, profile_.get(), NULL,
BookmarkEditor::EditDetails(GetNode("a")),
- BookmarkEditor::SHOW_TREE, NULL);
+ BookmarkEditor::SHOW_TREE);
GtkTreeIter bookmark_bar_node;
GtkTreeModel* store = GTK_TREE_MODEL(editor.tree_store_);
@@ -266,7 +266,7 @@ TEST_F(BookmarkEditorGtkTest, MoveToNewParent) {
TEST_F(BookmarkEditorGtkTest, NewURL) {
BookmarkEditorGtk editor(NULL, profile_.get(), NULL,
BookmarkEditor::EditDetails(),
- BookmarkEditor::SHOW_TREE, NULL);
+ BookmarkEditor::SHOW_TREE);
gtk_entry_set_text(GTK_ENTRY(editor.url_entry_),
GURL(base_path() + "a").spec().c_str());
@@ -291,7 +291,7 @@ TEST_F(BookmarkEditorGtkTest, ChangeURLNoTree) {
BookmarkEditorGtk editor(NULL, profile_.get(), NULL,
BookmarkEditor::EditDetails(
model_->other_node()->GetChild(0)),
- BookmarkEditor::NO_TREE, NULL);
+ BookmarkEditor::NO_TREE);
gtk_entry_set_text(GTK_ENTRY(editor.url_entry_),
GURL(base_path() + "a").spec().c_str());
@@ -313,7 +313,7 @@ TEST_F(BookmarkEditorGtkTest, ChangeTitleNoTree) {
BookmarkEditorGtk editor(NULL, profile_.get(), NULL,
BookmarkEditor::EditDetails(
model_->other_node()->GetChild(0)),
- BookmarkEditor::NO_TREE, NULL);
+ BookmarkEditor::NO_TREE);
gtk_entry_set_text(GTK_ENTRY(editor.name_entry_), "new_a");
editor.ApplyEdits();
diff --git a/chrome/browser/views/bookmark_bubble_view.cc b/chrome/browser/views/bookmark_bubble_view.cc
index bc88881..837969c 100644
--- a/chrome/browser/views/bookmark_bubble_view.cc
+++ b/chrome/browser/views/bookmark_bubble_view.cc
@@ -428,7 +428,7 @@ void BookmarkBubbleView::ShowEditor() {
if (node) {
BookmarkEditor::Show(parent, profile_, NULL,
BookmarkEditor::EditDetails(node),
- BookmarkEditor::SHOW_TREE, NULL);
+ BookmarkEditor::SHOW_TREE);
}
}
diff --git a/chrome/browser/views/bookmark_context_menu_controller_views.cc b/chrome/browser/views/bookmark_context_menu_controller_views.cc
index 712df82..8eda213 100644
--- a/chrome/browser/views/bookmark_context_menu_controller_views.cc
+++ b/chrome/browser/views/bookmark_context_menu_controller_views.cc
@@ -157,7 +157,7 @@ void BookmarkContextMenuControllerViews::ExecuteCommand(int id) {
editor_config = BookmarkEditor::NO_TREE;
BookmarkEditor::Show(parent_window_, profile_, parent_,
BookmarkEditor::EditDetails(selection_[0]),
- editor_config, NULL);
+ editor_config);
} else {
BookmarkFolderEditorController::Show(profile_, parent_window_,
selection_[0], -1, BookmarkFolderEditorController::NONE);
@@ -189,7 +189,7 @@ void BookmarkContextMenuControllerViews::ExecuteCommand(int id) {
BookmarkEditor::Show(
parent_window_, profile_,
bookmark_utils::GetParentForNewNodes(parent_, selection_, NULL),
- BookmarkEditor::EditDetails(), editor_config, NULL);
+ BookmarkEditor::EditDetails(), editor_config);
break;
}
diff --git a/chrome/browser/views/bookmark_editor_view.cc b/chrome/browser/views/bookmark_editor_view.cc
index bd61ab3..28b9867 100644
--- a/chrome/browser/views/bookmark_editor_view.cc
+++ b/chrome/browser/views/bookmark_editor_view.cc
@@ -51,11 +51,10 @@ void BookmarkEditor::Show(HWND parent_hwnd,
Profile* profile,
const BookmarkNode* parent,
const EditDetails& details,
- Configuration configuration,
- Handler* handler) {
+ Configuration configuration) {
DCHECK(profile);
BookmarkEditorView* editor =
- new BookmarkEditorView(profile, parent, details, configuration, handler);
+ new BookmarkEditorView(profile, parent, details, configuration);
editor->Show(parent_hwnd);
}
@@ -63,8 +62,7 @@ BookmarkEditorView::BookmarkEditorView(
Profile* profile,
const BookmarkNode* parent,
const EditDetails& details,
- BookmarkEditor::Configuration configuration,
- BookmarkEditor::Handler* handler)
+ BookmarkEditor::Configuration configuration)
: profile_(profile),
tree_view_(NULL),
new_group_button_(NULL),
@@ -73,8 +71,7 @@ BookmarkEditorView::BookmarkEditorView(
parent_(parent),
details_(details),
running_menu_for_root_(false),
- show_tree_(configuration == SHOW_TREE),
- handler_(handler) {
+ show_tree_(configuration == SHOW_TREE) {
DCHECK(profile);
Init();
}
@@ -535,7 +532,7 @@ void BookmarkEditorView::ApplyEdits(EditorNode* parent) {
if (!show_tree_) {
bookmark_utils::ApplyEditsWithNoGroupChange(
- bb_model_, parent_, details_, new_title, new_url, handler_.get());
+ bb_model_, parent_, details_, new_title, new_url, NULL);
return;
}
@@ -545,7 +542,7 @@ void BookmarkEditorView::ApplyEdits(EditorNode* parent) {
bb_model_->root_node(), tree_model_->GetRoot(), parent, &new_parent);
bookmark_utils::ApplyEditsWithPossibleGroupChange(
- bb_model_, new_parent, details_, new_title, new_url, handler_.get());
+ bb_model_, new_parent, details_, new_title, new_url, NULL);
}
void BookmarkEditorView::ApplyNameChangesAndCreateNewGroups(
diff --git a/chrome/browser/views/bookmark_editor_view.h b/chrome/browser/views/bookmark_editor_view.h
index 84fccf6..75a78f6 100644
--- a/chrome/browser/views/bookmark_editor_view.h
+++ b/chrome/browser/views/bookmark_editor_view.h
@@ -72,8 +72,7 @@ class BookmarkEditorView : public BookmarkEditor,
BookmarkEditorView(Profile* profile,
const BookmarkNode* parent,
const EditDetails& details,
- BookmarkEditor::Configuration configuration,
- BookmarkEditor::Handler* handler);
+ BookmarkEditor::Configuration configuration);
virtual ~BookmarkEditorView();
@@ -260,8 +259,6 @@ class BookmarkEditorView : public BookmarkEditor,
// Is the tree shown?
bool show_tree_;
- scoped_ptr<BookmarkEditor::Handler> handler_;
-
DISALLOW_COPY_AND_ASSIGN(BookmarkEditorView);
};
diff --git a/chrome/browser/views/bookmark_editor_view_unittest.cc b/chrome/browser/views/bookmark_editor_view_unittest.cc
index 66a6ab4..15b30ad 100644
--- a/chrome/browser/views/bookmark_editor_view_unittest.cc
+++ b/chrome/browser/views/bookmark_editor_view_unittest.cc
@@ -62,10 +62,9 @@ class BookmarkEditorViewTest : public testing::Test {
void CreateEditor(Profile* profile,
const BookmarkNode* parent,
const BookmarkEditor::EditDetails& details,
- BookmarkEditor::Configuration configuration,
- BookmarkEditor::Handler* handler) {
+ BookmarkEditor::Configuration configuration) {
editor_.reset(new BookmarkEditorView(profile, parent, details,
- configuration, handler));
+ configuration));
}
void SetTitleText(const std::wstring& title) {
@@ -130,7 +129,7 @@ class BookmarkEditorViewTest : public testing::Test {
// Makes sure the tree model matches that of the bookmark bar model.
TEST_F(BookmarkEditorViewTest, ModelsMatch) {
CreateEditor(profile_.get(), NULL, BookmarkEditor::EditDetails(),
- BookmarkEditorView::SHOW_TREE, NULL);
+ BookmarkEditorView::SHOW_TREE);
BookmarkEditorView::EditorNode* editor_root = editor_tree_model()->GetRoot();
// The root should have two children, one for the bookmark bar node,
// the other for the 'other bookmarks' folder.
@@ -155,7 +154,7 @@ TEST_F(BookmarkEditorViewTest, ModelsMatch) {
// Changes the title and makes sure parent/visual order doesn't change.
TEST_F(BookmarkEditorViewTest, EditTitleKeepsPosition) {
CreateEditor(profile_.get(), NULL, BookmarkEditor::EditDetails(GetNode("a")),
- BookmarkEditorView::SHOW_TREE, NULL);
+ BookmarkEditorView::SHOW_TREE);
SetTitleText(L"new_a");
ApplyEdits(editor_tree_model()->GetRoot()->GetChild(0));
@@ -172,7 +171,7 @@ TEST_F(BookmarkEditorViewTest, EditURLKeepsPosition) {
Time node_time = Time::Now() + TimeDelta::FromDays(2);
GetMutableNode("a")->set_date_added(node_time);
CreateEditor(profile_.get(), NULL, BookmarkEditor::EditDetails(GetNode("a")),
- BookmarkEditorView::SHOW_TREE, NULL);
+ BookmarkEditorView::SHOW_TREE);
SetURLText(UTF8ToWide(GURL(base_path() + "new_a").spec()));
@@ -189,7 +188,7 @@ TEST_F(BookmarkEditorViewTest, EditURLKeepsPosition) {
// Moves 'a' to be a child of the other node.
TEST_F(BookmarkEditorViewTest, ChangeParent) {
CreateEditor(profile_.get(), NULL, BookmarkEditor::EditDetails(GetNode("a")),
- BookmarkEditorView::SHOW_TREE, NULL);
+ BookmarkEditorView::SHOW_TREE);
ApplyEdits(editor_tree_model()->GetRoot()->GetChild(1));
@@ -203,7 +202,7 @@ TEST_F(BookmarkEditorViewTest, ChangeParentAndURL) {
Time node_time = Time::Now() + TimeDelta::FromDays(2);
GetMutableNode("a")->set_date_added(node_time);
CreateEditor(profile_.get(), NULL, BookmarkEditor::EditDetails(GetNode("a")),
- BookmarkEditorView::SHOW_TREE, NULL);
+ BookmarkEditorView::SHOW_TREE);
SetURLText(UTF8ToWide(GURL(base_path() + "new_a").spec()));
@@ -218,7 +217,7 @@ TEST_F(BookmarkEditorViewTest, ChangeParentAndURL) {
// Creates a new folder and moves a node to it.
TEST_F(BookmarkEditorViewTest, MoveToNewParent) {
CreateEditor(profile_.get(), NULL, BookmarkEditor::EditDetails(GetNode("a")),
- BookmarkEditorView::SHOW_TREE, NULL);
+ BookmarkEditorView::SHOW_TREE);
// Create two nodes: "F21" as a child of "F2" and "F211" as a child of "F21".
BookmarkEditorView::EditorNode* f2 =
@@ -251,7 +250,7 @@ TEST_F(BookmarkEditorViewTest, MoveToNewParent) {
// Brings up the editor, creating a new URL on the bookmark bar.
TEST_F(BookmarkEditorViewTest, NewURL) {
CreateEditor(profile_.get(), NULL, BookmarkEditor::EditDetails(),
- BookmarkEditorView::SHOW_TREE, NULL);
+ BookmarkEditorView::SHOW_TREE);
SetURLText(UTF8ToWide(GURL(base_path() + "a").spec()));
SetTitleText(L"new_a");
@@ -272,7 +271,7 @@ TEST_F(BookmarkEditorViewTest, NewURL) {
TEST_F(BookmarkEditorViewTest, ChangeURLNoTree) {
CreateEditor(profile_.get(), NULL,
BookmarkEditor::EditDetails(model_->other_node()->GetChild(0)),
- BookmarkEditorView::NO_TREE, NULL);
+ BookmarkEditorView::NO_TREE);
SetURLText(UTF8ToWide(GURL(base_path() + "a").spec()));
SetTitleText(L"new_a");
@@ -292,7 +291,7 @@ TEST_F(BookmarkEditorViewTest, ChangeURLNoTree) {
TEST_F(BookmarkEditorViewTest, ChangeTitleNoTree) {
CreateEditor(profile_.get(), NULL,
BookmarkEditor::EditDetails(model_->other_node()->GetChild(0)),
- BookmarkEditorView::NO_TREE, NULL);
+ BookmarkEditorView::NO_TREE);
SetTitleText(L"new_a");
@@ -312,7 +311,7 @@ TEST_F(BookmarkEditorViewTest, NewFolder) {
details.urls.push_back(std::make_pair(GURL(base_path() + "x"), L"z"));
details.type = BookmarkEditor::EditDetails::NEW_FOLDER;
CreateEditor(profile_.get(), model_->GetBookmarkBarNode(),
- details, BookmarkEditorView::SHOW_TREE, NULL);
+ details, BookmarkEditorView::SHOW_TREE);
// The url field shouldn't be visible.
EXPECT_FALSE(URLTFHasParent());
@@ -342,7 +341,7 @@ TEST_F(BookmarkEditorViewTest, MoveFolder) {
details.urls.push_back(std::make_pair(GURL(base_path() + "x"), L"z"));
details.type = BookmarkEditor::EditDetails::NEW_FOLDER;
CreateEditor(profile_.get(), model_->GetBookmarkBarNode(),
- details, BookmarkEditorView::SHOW_TREE, NULL);
+ details, BookmarkEditorView::SHOW_TREE);
SetTitleText(L"new_F");