summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 19:43:24 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 19:43:24 +0000
commit23db9f7756b518c5655e44e3280f9af7df91879a (patch)
tree49217d275f464ea6cbc5d9b021648446ff6cde45 /chrome
parent2037b0104b00698046fbcfcbb783f9c6e2a016f0 (diff)
downloadchromium_src-23db9f7756b518c5655e44e3280f9af7df91879a.zip
chromium_src-23db9f7756b518c5655e44e3280f9af7df91879a.tar.gz
chromium_src-23db9f7756b518c5655e44e3280f9af7df91879a.tar.bz2
Rename TreeNode::SetTitle to TreeNode::set_title. Part 4.
While I'm here: - Add OVERRIDE to some methods. - Remove unnecessary include. - Remove "virtual" keyword from a method that doesn't need to be overridden. - Remove an unused forward declaration. - And some other random cleanups. BUG=None TEST=existing unit_tests. Review URL: http://codereview.chromium.org/6673017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77844 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/bookmarks/bookmark_codec.cc6
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc12
-rw-r--r--chrome/browser/bookmarks/bookmark_model_unittest.cc4
-rw-r--r--chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm4
-rw-r--r--chrome/browser/sync/glue/bookmark_model_associator.cc2
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc2
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc4
7 files changed, 17 insertions, 17 deletions
diff --git a/chrome/browser/bookmarks/bookmark_codec.cc b/chrome/browser/bookmarks/bookmark_codec.cc
index fa557ea..7bb38d9 100644
--- a/chrome/browser/bookmarks/bookmark_codec.cc
+++ b/chrome/browser/bookmarks/bookmark_codec.cc
@@ -159,8 +159,8 @@ bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node,
// the file.
bb_node->set_type(BookmarkNode::BOOKMARK_BAR);
other_folder_node->set_type(BookmarkNode::OTHER_NODE);
- bb_node->SetTitle(l10n_util::GetStringUTF16(IDS_BOOMARK_BAR_FOLDER_NAME));
- other_folder_node->SetTitle(
+ bb_node->set_title(l10n_util::GetStringUTF16(IDS_BOOMARK_BAR_FOLDER_NAME));
+ other_folder_node->set_title(
l10n_util::GetStringUTF16(IDS_BOOMARK_BAR_OTHER_FOLDER_NAME));
return true;
@@ -283,7 +283,7 @@ bool BookmarkCodec::DecodeNode(const DictionaryValue& value,
return false;
}
- node->SetTitle(title);
+ node->set_title(title);
node->set_date_added(date_added);
return true;
}
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index f6033fd..716af38 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -83,7 +83,7 @@ void BookmarkNode::Reset(const history::StarredEntry& entry) {
}
date_added_ = entry.date_added;
date_folder_modified_ = entry.date_folder_modified;
- SetTitle(entry.title);
+ set_title(entry.title);
}
// BookmarkModel --------------------------------------------------------------
@@ -267,7 +267,7 @@ void BookmarkModel::SetTitle(const BookmarkNode* node, const string16& title) {
// The title index doesn't support changing the title, instead we remove then
// add it back.
index_->Remove(node);
- AsMutable(node)->SetTitle(title);
+ AsMutable(node)->set_title(title);
index_->Add(node);
if (store_.get())
@@ -383,7 +383,7 @@ const BookmarkNode* BookmarkModel::AddGroup(const BookmarkNode* parent,
BookmarkNode* new_node = new BookmarkNode(generate_next_node_id(),
GURL());
new_node->set_date_folder_modified(Time::Now());
- new_node->SetTitle(title);
+ new_node->set_title(title);
new_node->set_type(BookmarkNode::FOLDER);
return AddNode(AsMutable(parent), index, new_node, false);
@@ -413,7 +413,7 @@ const BookmarkNode* BookmarkModel::AddURLWithCreationTime(
SetDateGroupModified(parent, creation_time);
BookmarkNode* new_node = new BookmarkNode(generate_next_node_id(), url);
- new_node->SetTitle(title);
+ new_node->set_title(title);
new_node->set_date_added(creation_time);
new_node->set_type(BookmarkNode::URL);
@@ -726,9 +726,9 @@ BookmarkNode* BookmarkModel::CreateRootNodeFromStarredEntry(
BookmarkNode* node = new BookmarkNode(generate_next_node_id(), GURL());
node->Reset(entry);
if (entry.type == history::StarredEntry::BOOKMARK_BAR) {
- node->SetTitle(l10n_util::GetStringUTF16(IDS_BOOMARK_BAR_FOLDER_NAME));
+ node->set_title(l10n_util::GetStringUTF16(IDS_BOOMARK_BAR_FOLDER_NAME));
} else {
- node->SetTitle(
+ node->set_title(
l10n_util::GetStringUTF16(IDS_BOOMARK_BAR_OTHER_FOLDER_NAME));
}
return node;
diff --git a/chrome/browser/bookmarks/bookmark_model_unittest.cc b/chrome/browser/bookmarks/bookmark_model_unittest.cc
index 9f8c779..0df187c 100644
--- a/chrome/browser/bookmarks/bookmark_model_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_model_unittest.cc
@@ -974,10 +974,10 @@ TEST_F(BookmarkModelTest, Sort) {
PopulateBookmarkNode(&bbn, &model, parent);
BookmarkNode* child1 = AsMutable(parent->GetChild(1));
- child1->SetTitle(ASCIIToUTF16("a"));
+ child1->set_title(ASCIIToUTF16("a"));
delete child1->Remove(0);
BookmarkNode* child3 = AsMutable(parent->GetChild(3));
- child3->SetTitle(ASCIIToUTF16("C"));
+ child3->set_title(ASCIIToUTF16("C"));
delete child3->Remove(0);
ClearCounts();
diff --git a/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm b/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm
index 76fc372..ee907cf 100644
--- a/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm
+++ b/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm
@@ -60,14 +60,14 @@ void ConvertPlistToElements(NSArray* input,
if (is_folder) {
new_node->set_type(BookmarkNode::FOLDER);
NSString* title = [pboardBookmark objectForKey:@"Title"];
- new_node->SetTitle(base::SysNSStringToUTF16(title));
+ new_node->set_title(base::SysNSStringToUTF16(title));
} else {
new_node->set_type(BookmarkNode::URL);
NSDictionary* uriDictionary =
[pboardBookmark objectForKey:@"URIDictionary"];
NSString* title = [uriDictionary objectForKey:@"title"];
NSString* urlString = [pboardBookmark objectForKey:@"URLString"];
- new_node->SetTitle(base::SysNSStringToUTF16(title));
+ new_node->set_title(base::SysNSStringToUTF16(title));
new_node->SetURL(GURL(base::SysNSStringToUTF8(urlString)));
}
BookmarkNodeData::Element e = BookmarkNodeData::Element(new_node.get());
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index fe92cf9..67f1126 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -95,7 +95,7 @@ const BookmarkNode* BookmarkNodeFinder::FindBookmarkNode(
const sync_api::BaseNode& sync_node) {
// Create a bookmark node from the given sync node.
BookmarkNode temp_node(sync_node.GetURL());
- temp_node.SetTitle(WideToUTF16Hack(sync_node.GetTitle()));
+ temp_node.set_title(WideToUTF16Hack(sync_node.GetTitle()));
if (sync_node.GetIsFolder())
temp_node.set_type(BookmarkNode::FOLDER);
else
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
index 4433a54..8bf8769 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
@@ -458,7 +458,7 @@ void BookmarkEditorView::NewGroup() {
BookmarkEditorView::EditorNode* BookmarkEditorView::AddNewGroup(
EditorNode* parent) {
EditorNode* new_node = new EditorNode();
- new_node->SetTitle(
+ new_node->set_title(
l10n_util::GetStringUTF16(IDS_BOOMARK_EDITOR_NEW_FOLDER_NAME));
new_node->value = 0;
// new_node is now owned by parent.
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
index 0ec1afb..8e1571d 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
@@ -224,9 +224,9 @@ TEST_F(BookmarkEditorViewTest, MoveToNewParent) {
BookmarkEditorView::EditorNode* f2 =
editor_tree_model()->GetRoot()->GetChild(0)->GetChild(1);
BookmarkEditorView::EditorNode* f21 = AddNewGroup(f2);
- f21->SetTitle(ASCIIToUTF16("F21"));
+ f21->set_title(ASCIIToUTF16("F21"));
BookmarkEditorView::EditorNode* f211 = AddNewGroup(f21);
- f211->SetTitle(ASCIIToUTF16("F211"));
+ f211->set_title(ASCIIToUTF16("F211"));
// Parent the node to "F21".
ApplyEdits(f2);