summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-26 20:35:51 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-26 20:35:51 +0000
commitf3aa8945b8ee2f3eae5259c215ca523b71a34edc (patch)
treeb941c3cadb372eb3cda1e5faf5d23ea9278a7a59 /chrome/browser/bookmarks
parent7063140edd3040e56471003698be96509501f2c9 (diff)
downloadchromium_src-f3aa8945b8ee2f3eae5259c215ca523b71a34edc.zip
chromium_src-f3aa8945b8ee2f3eae5259c215ca523b71a34edc.tar.gz
chromium_src-f3aa8945b8ee2f3eae5259c215ca523b71a34edc.tar.bz2
Linux/GTK: delete native bookmark manager code.
Views code still to be deleted; some cleanup will take place then. BUG=38908 TEST=everything keeps working as before Review URL: http://codereview.chromium.org/1753009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r--chrome/browser/bookmarks/bookmark_context_menu_controller.cc16
-rw-r--r--chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc14
-rw-r--r--chrome/browser/bookmarks/bookmark_folder_editor_controller.cc6
3 files changed, 22 insertions, 14 deletions
diff --git a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc
index d6c01cf..02df337 100644
--- a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc
+++ b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc
@@ -45,7 +45,11 @@ class SelectOnCreationHandler : public BookmarkEditor::Handler {
}
virtual void NodeCreated(const BookmarkNode* new_node) {
+// TODO(viettrungluu): I don't know if this is really needed, but it'll be
+// deleted soon.
+#if defined(OS_WIN)
BookmarkManager::SelectInTree(profile_, new_node);
+#endif
}
private:
@@ -108,10 +112,14 @@ void BookmarkContextMenuController::BuildMenu() {
AddItem(IDS_BOOKMARK_BAR_EDIT);
}
+// TODO(viettrungluu): I don't know if this is really needed, but it'll be
+// deleted soon.
+#if defined(OS_WIN)
if (configuration_ == BOOKMARK_MANAGER_TABLE_OTHER ||
configuration_ == BOOKMARK_MANAGER_ORGANIZE_MENU_OTHER) {
AddItem(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER);
}
+#endif
AddSeparator();
AddItem(IDS_CUT);
@@ -265,6 +273,9 @@ void BookmarkContextMenuController::ExecuteCommand(int id) {
bookmark_utils::ToggleWhenVisible(profile_);
break;
+// TODO(viettrungluu): I don't know if this is really needed, but it'll be
+// deleted soon.
+#if defined(OS_WIN)
case IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER:
UserMetrics::RecordAction(
UserMetricsAction("BookmarkBar_ContextMenu_ShowInFolder"),
@@ -277,6 +288,7 @@ void BookmarkContextMenuController::ExecuteCommand(int id) {
BookmarkManager::SelectInTree(profile_, selection_[0]);
break;
+#endif
case IDS_BOOKMARK_MANAGER:
UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager"),
@@ -350,10 +362,14 @@ bool BookmarkContextMenuController::IsCommandIdEnabled(int command_id) const {
case IDS_BOOKMARK_BAR_REMOVE:
return !selection_.empty() && !is_root_node;
+// TODO(viettrungluu): I don't know if this is really needed, but it'll be
+// deleted soon.
+#if defined(OS_WIN)
case IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER:
return (configuration_ == BOOKMARK_MANAGER_TABLE_OTHER ||
configuration_ == BOOKMARK_MANAGER_ORGANIZE_MENU_OTHER) &&
selection_.size() == 1;
+#endif
case IDS_BOOKMARK_MANAGER_SORT:
return parent_ && parent_ != model_->root_node();
diff --git a/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc b/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc
index 50b8187..db14a44 100644
--- a/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc
@@ -141,8 +141,6 @@ TEST_F(BookmarkContextMenuControllerTest, EmptyNodes) {
EXPECT_FALSE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_FALSE(controller.IsCommandIdEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandIdEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -163,8 +161,6 @@ TEST_F(BookmarkContextMenuControllerTest, SingleURL) {
EXPECT_TRUE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_TRUE(controller.IsCommandIdEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandIdEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -186,8 +182,6 @@ TEST_F(BookmarkContextMenuControllerTest, MultipleURLs) {
EXPECT_TRUE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_TRUE(controller.IsCommandIdEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandIdEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -208,8 +202,6 @@ TEST_F(BookmarkContextMenuControllerTest, SingleFolder) {
EXPECT_FALSE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_TRUE(controller.IsCommandIdEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandIdEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -231,8 +223,6 @@ TEST_F(BookmarkContextMenuControllerTest, MultipleEmptyFolders) {
EXPECT_FALSE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_TRUE(controller.IsCommandIdEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandIdEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -254,8 +244,6 @@ TEST_F(BookmarkContextMenuControllerTest, MultipleFoldersWithURLs) {
EXPECT_TRUE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_TRUE(controller.IsCommandIdEnabled(IDS_BOOKMARK_BAR_REMOVE));
- EXPECT_FALSE(
- controller.IsCommandIdEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
EXPECT_TRUE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_TRUE(
@@ -300,8 +288,6 @@ TEST_F(BookmarkContextMenuControllerTest, EmptyNodesNullParent) {
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO));
EXPECT_FALSE(controller.IsCommandIdEnabled(IDS_BOOKMARK_BAR_REMOVE));
EXPECT_FALSE(
- controller.IsCommandIdEnabled(IDS_BOOKMARK_MANAGER_SHOW_IN_FOLDER));
- EXPECT_FALSE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK));
EXPECT_FALSE(
controller.IsCommandIdEnabled(IDS_BOOMARK_BAR_NEW_FOLDER));
diff --git a/chrome/browser/bookmarks/bookmark_folder_editor_controller.cc b/chrome/browser/bookmarks/bookmark_folder_editor_controller.cc
index 06f3ef4..0d04891 100644
--- a/chrome/browser/bookmarks/bookmark_folder_editor_controller.cc
+++ b/chrome/browser/bookmarks/bookmark_folder_editor_controller.cc
@@ -63,10 +63,16 @@ bool BookmarkFolderEditorController::IsValid(const std::wstring& text) {
void BookmarkFolderEditorController::InputAccepted(const std::wstring& text) {
if (IsNew()) {
+#if defined(OS_WIN)
+ // TODO(viettrungluu): Implement this the following for the tabbed bookmark
+ // manager?
ALLOW_UNUSED const BookmarkNode* node =
model_->AddGroup(node_, index_, text);
if ((details_ & SHOW_IN_MANAGER) != 0)
BookmarkManager::SelectInTree(profile_, node);
+#else
+ model_->AddGroup(node_, index_, text);
+#endif
} else {
model_->SetTitle(node_, text);
}