summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-21 21:53:44 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-21 21:53:44 +0000
commit9fcaee7b1abf5941e917eaf14bccad6eb13a74fa (patch)
tree17e4a5b8e32da2de69cb8fa387839bba1500a1dd /chrome/browser/bookmarks
parent1fd6dccfc0bd2383005181c52635ff5b90dbae78 (diff)
downloadchromium_src-9fcaee7b1abf5941e917eaf14bccad6eb13a74fa.zip
chromium_src-9fcaee7b1abf5941e917eaf14bccad6eb13a74fa.tar.gz
chromium_src-9fcaee7b1abf5941e917eaf14bccad6eb13a74fa.tar.bz2
bookmarks: Rename more entries from Group/group/GROUP to Folder/folder/FOLDER.
BUG=None TEST=None R=sky@chromium.org Review URL: http://codereview.chromium.org/6685113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78930 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc4
-rw-r--r--chrome/browser/bookmarks/bookmark_model_unittest.cc12
-rw-r--r--chrome/browser/bookmarks/bookmark_utils.cc8
-rw-r--r--chrome/browser/bookmarks/bookmark_utils.h8
-rw-r--r--chrome/browser/bookmarks/recently_used_folders_combo_model.cc4
5 files changed, 18 insertions, 18 deletions
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index 43109e8..5439fc0 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -69,7 +69,7 @@ void BookmarkNode::Reset(const history::StarredEntry& entry) {
case history::StarredEntry::URL:
type_ = BookmarkNode::URL;
break;
- case history::StarredEntry::USER_GROUP:
+ case history::StarredEntry::USER_FOLDER:
type_ = BookmarkNode::FOLDER;
break;
case history::StarredEntry::BOOKMARK_BAR:
@@ -164,7 +164,7 @@ void BookmarkModel::Load() {
const BookmarkNode* BookmarkModel::GetParentForNewNodes() {
std::vector<const BookmarkNode*> nodes =
- bookmark_utils::GetMostRecentlyModifiedGroups(this, 1);
+ bookmark_utils::GetMostRecentlyModifiedFolders(this, 1);
return nodes.empty() ? bookmark_bar_node_ : nodes[0];
}
diff --git a/chrome/browser/bookmarks/bookmark_model_unittest.cc b/chrome/browser/bookmarks/bookmark_model_unittest.cc
index 1adb366..ddb1cb7 100644
--- a/chrome/browser/bookmarks/bookmark_model_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_model_unittest.cc
@@ -238,7 +238,7 @@ TEST_F(BookmarkModelTest, RemoveURL) {
ASSERT_TRUE(model.GetMostRecentlyAddedNodeForURL(url) == NULL);
}
-TEST_F(BookmarkModelTest, RemoveGroup) {
+TEST_F(BookmarkModelTest, RemoveFolder) {
const BookmarkNode* root = model.GetBookmarkBarNode();
const BookmarkNode* folder = model.AddFolder(root, 0, ASCIIToUTF16("foo"));
@@ -384,7 +384,7 @@ TEST_F(BookmarkModelTest, ParentForNewNodes) {
}
// Make sure recently modified stays in sync when adding a URL.
-TEST_F(BookmarkModelTest, MostRecentlyModifiedGroups) {
+TEST_F(BookmarkModelTest, MostRecentlyModifiedFolders) {
// Add a folder.
const BookmarkNode* folder = model.AddFolder(model.other_node(), 0,
ASCIIToUTF16("foo"));
@@ -393,7 +393,7 @@ TEST_F(BookmarkModelTest, MostRecentlyModifiedGroups) {
// Make sure folder is in the most recently modified.
std::vector<const BookmarkNode*> most_recent_folders =
- bookmark_utils::GetMostRecentlyModifiedGroups(&model, 1);
+ bookmark_utils::GetMostRecentlyModifiedFolders(&model, 1);
ASSERT_EQ(1U, most_recent_folders.size());
ASSERT_EQ(folder, most_recent_folders[0]);
@@ -401,7 +401,7 @@ TEST_F(BookmarkModelTest, MostRecentlyModifiedGroups) {
// returned list.
model.Remove(folder->parent(), 0);
most_recent_folders =
- bookmark_utils::GetMostRecentlyModifiedGroups(&model, 1);
+ bookmark_utils::GetMostRecentlyModifiedFolders(&model, 1);
ASSERT_EQ(1U, most_recent_folders.size());
ASSERT_TRUE(most_recent_folders[0] != folder);
}
@@ -580,7 +580,7 @@ static void PopulateNodeImpl(const std::vector<std::string>& description,
(*index)++;
if (element == "[") {
// Create a new folder and recurse to add all the children.
- // Groups are given a unique named by way of an ever increasing integer
+ // Folders are given a unique named by way of an ever increasing integer
// value. The folders need not have a name, but one is assigned to help
// in debugging.
static int next_folder_id = 1;
@@ -607,7 +607,7 @@ static void PopulateNodeImpl(const std::vector<std::string>& description,
// Creates and adds nodes to parent based on description. description consists
// of the following tokens (all space separated):
-// [ : creates a new USER_GROUP node. All elements following the [ until the
+// [ : creates a new USER_FOLDER node. All elements following the [ until the
// next balanced ] is encountered are added as children to the node.
// ] : closes the last folder created by [ so that any further nodes are added
// to the current folders parent.
diff --git a/chrome/browser/bookmarks/bookmark_utils.cc b/chrome/browser/bookmarks/bookmark_utils.cc
index 7bcb716..2709a27 100644
--- a/chrome/browser/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/bookmarks/bookmark_utils.cc
@@ -146,7 +146,7 @@ void OpenAllImpl(const BookmarkNode* node,
} // else, new_browser == NULL, which happens during testing.
}
} else {
- // Group, recurse through children.
+ // Folder, recurse through children.
for (int i = 0; i < node->child_count(); ++i) {
OpenAllImpl(node->GetChild(i), initial_disposition, navigator,
opened_url);
@@ -440,7 +440,7 @@ string16 GetNameForURL(const GURL& url) {
}
}
-std::vector<const BookmarkNode*> GetMostRecentlyModifiedGroups(
+std::vector<const BookmarkNode*> GetMostRecentlyModifiedFolders(
BookmarkModel* model,
size_t max_count) {
std::vector<const BookmarkNode*> nodes;
@@ -563,7 +563,7 @@ static const BookmarkNode* CreateNewNode(BookmarkModel* model,
return node;
}
-const BookmarkNode* ApplyEditsWithNoGroupChange(BookmarkModel* model,
+const BookmarkNode* ApplyEditsWithNoFolderChange(BookmarkModel* model,
const BookmarkNode* parent, const BookmarkEditor::EditDetails& details,
const string16& new_title, const GURL& new_url) {
if (details.type == BookmarkEditor::EditDetails::NEW_URL ||
@@ -581,7 +581,7 @@ const BookmarkNode* ApplyEditsWithNoGroupChange(BookmarkModel* model,
return node;
}
-const BookmarkNode* ApplyEditsWithPossibleGroupChange(BookmarkModel* model,
+const BookmarkNode* ApplyEditsWithPossibleFolderChange(BookmarkModel* model,
const BookmarkNode* new_parent, const BookmarkEditor::EditDetails& details,
const string16& new_title, const GURL& new_url) {
if (details.type == BookmarkEditor::EditDetails::NEW_URL ||
diff --git a/chrome/browser/bookmarks/bookmark_utils.h b/chrome/browser/bookmarks/bookmark_utils.h
index b2ed767..6e14bc9 100644
--- a/chrome/browser/bookmarks/bookmark_utils.h
+++ b/chrome/browser/bookmarks/bookmark_utils.h
@@ -10,8 +10,8 @@
#include <vector>
#include "base/string16.h"
-#include "chrome/browser/bookmarks/bookmark_node_data.h"
#include "chrome/browser/bookmarks/bookmark_editor.h"
+#include "chrome/browser/bookmarks/bookmark_node_data.h"
#include "chrome/browser/history/snippet.h"
#include "ui/gfx/native_widget_types.h"
#include "webkit/glue/window_open_disposition.h"
@@ -119,7 +119,7 @@ string16 GetNameForURL(const GURL& url);
// Returns a vector containing up to |max_count| of the most recently modified
// folders. This never returns an empty vector.
-std::vector<const BookmarkNode*> GetMostRecentlyModifiedGroups(
+std::vector<const BookmarkNode*> GetMostRecentlyModifiedFolders(
BookmarkModel* model, size_t max_count);
// Returns the most recently added bookmarks. This does not return folders,
@@ -162,7 +162,7 @@ bool DoesBookmarkContainText(const BookmarkNode* node,
// done regarding moving from one folder to another). If a new node is
// explicitly being added, returns a pointer to the new node that was created.
// Otherwise the return value is identically |node|.
-const BookmarkNode* ApplyEditsWithNoGroupChange(
+const BookmarkNode* ApplyEditsWithNoFolderChange(
BookmarkModel* model,
const BookmarkNode* parent,
const BookmarkEditor::EditDetails& details,
@@ -173,7 +173,7 @@ const BookmarkNode* ApplyEditsWithNoGroupChange(
// changed and the node will need to be removed and reinserted. If a new node
// is explicitly being added, returns a pointer to the new node that was
// created. Otherwise the return value is identically |node|.
-const BookmarkNode* ApplyEditsWithPossibleGroupChange(
+const BookmarkNode* ApplyEditsWithPossibleFolderChange(
BookmarkModel* model,
const BookmarkNode* new_parent,
const BookmarkEditor::EditDetails& details,
diff --git a/chrome/browser/bookmarks/recently_used_folders_combo_model.cc b/chrome/browser/bookmarks/recently_used_folders_combo_model.cc
index ca227ba..3bc18e2 100644
--- a/chrome/browser/bookmarks/recently_used_folders_combo_model.cc
+++ b/chrome/browser/bookmarks/recently_used_folders_combo_model.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -18,7 +18,7 @@ const size_t kMaxMRUFolders = 5;
RecentlyUsedFoldersComboModel::RecentlyUsedFoldersComboModel(
BookmarkModel* model, const BookmarkNode* node)
// Use + 2 to account for bookmark bar and other node.
- : nodes_(bookmark_utils::GetMostRecentlyModifiedGroups(
+ : nodes_(bookmark_utils::GetMostRecentlyModifiedFolders(
model, kMaxMRUFolders + 2)),
node_parent_index_(0) {
// TODO(sky): bug 1173415 add a separator in the combobox here.