summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 05:31:40 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 05:31:40 +0000
commit440b37b2c3a29be151a7262d9188d5e8151176fb (patch)
treeb2cc9283d1efd597472619dcfd016a4a0f0e32ff /chrome/browser/cocoa
parent6cd3bd20cd448bc1bca33748395bf4381dfb7fc6 (diff)
downloadchromium_src-440b37b2c3a29be151a7262d9188d5e8151176fb.zip
chromium_src-440b37b2c3a29be151a7262d9188d5e8151176fb.tar.gz
chromium_src-440b37b2c3a29be151a7262d9188d5e8151176fb.tar.bz2
Remove the wstring TreeModelNode::GetTitle() and rename GetTitleAsString16() to GetTitle().
BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3279005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57834 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r--chrome/browser/cocoa/applescript/bookmark_node_applescript.mm2
-rw-r--r--chrome/browser/cocoa/bookmark_all_tabs_controller_unittest.mm2
-rw-r--r--chrome/browser/cocoa/bookmark_bar_controller.mm6
-rw-r--r--chrome/browser/cocoa/bookmark_bar_controller_unittest.mm10
-rw-r--r--chrome/browser/cocoa/bookmark_bar_folder_controller.mm2
-rw-r--r--chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm2
-rw-r--r--chrome/browser/cocoa/bookmark_bubble_controller.mm9
-rw-r--r--chrome/browser/cocoa/bookmark_bubble_controller_unittest.mm4
-rw-r--r--chrome/browser/cocoa/bookmark_button_cell.mm2
-rw-r--r--chrome/browser/cocoa/bookmark_editor_base_controller.mm3
-rw-r--r--chrome/browser/cocoa/bookmark_editor_controller.mm2
-rw-r--r--chrome/browser/cocoa/bookmark_editor_controller_unittest.mm10
-rw-r--r--chrome/browser/cocoa/bookmark_folder_target.mm2
-rw-r--r--chrome/browser/cocoa/bookmark_menu_bridge.mm2
-rw-r--r--chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm3
-rw-r--r--chrome/browser/cocoa/bookmark_name_folder_controller.mm3
-rw-r--r--chrome/browser/cocoa/bookmark_name_folder_controller_unittest.mm6
-rw-r--r--chrome/browser/cocoa/collected_cookies_mac.mm2
-rw-r--r--chrome/browser/cocoa/cookie_tree_node.mm3
-rw-r--r--chrome/browser/cocoa/extension_installed_bubble_controller.mm1
20 files changed, 35 insertions, 41 deletions
diff --git a/chrome/browser/cocoa/applescript/bookmark_node_applescript.mm b/chrome/browser/cocoa/applescript/bookmark_node_applescript.mm
index a1aa22c..af30c04 100644
--- a/chrome/browser/cocoa/applescript/bookmark_node_applescript.mm
+++ b/chrome/browser/cocoa/applescript/bookmark_node_applescript.mm
@@ -83,7 +83,7 @@
if (!bookmarkNode_)
return tempTitle_;
- return base::SysUTF16ToNSString(bookmarkNode_->GetTitleAsString16());
+ return base::SysUTF16ToNSString(bookmarkNode_->GetTitle());
}
- (void)setTitle:(NSString*)aTitle {
diff --git a/chrome/browser/cocoa/bookmark_all_tabs_controller_unittest.mm b/chrome/browser/cocoa/bookmark_all_tabs_controller_unittest.mm
index 823bccc..7f9878d 100644
--- a/chrome/browser/cocoa/bookmark_all_tabs_controller_unittest.mm
+++ b/chrome/browser/cocoa/bookmark_all_tabs_controller_unittest.mm
@@ -77,6 +77,6 @@ TEST_F(BookmarkAllTabsControllerTest, BookmarkAllTabs) {
[controller_ ok:nil];
EXPECT_EQ(4, group_a_->GetChildCount());
const BookmarkNode* folderChild = group_a_->GetChild(3);
- EXPECT_EQ(folderChild->GetTitleAsString16(), ASCIIToUTF16("ALL MY TABS"));
+ EXPECT_EQ(folderChild->GetTitle(), ASCIIToUTF16("ALL MY TABS"));
EXPECT_EQ(3, folderChild->GetChildCount());
}
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm
index 401760c..7bd2988 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bar_controller.mm
@@ -984,7 +984,7 @@ const NSTimeInterval kBookmarkBarAnimationDuration = 0.12;
// Add a tooltip
std::string url_string = child->GetURL().possibly_invalid_spec();
NSString* tooltip = [NSString stringWithFormat:@"%@\n%s",
- base::SysUTF16ToNSString(child->GetTitleAsString16()),
+ base::SysUTF16ToNSString(child->GetTitle()),
url_string.c_str()];
[item setToolTip:tooltip];
}
@@ -1013,7 +1013,7 @@ const NSTimeInterval kBookmarkBarAnimationDuration = 0.12;
- (NSMenu *)menuForFolderNode:(const BookmarkNode*)node {
if (!node->is_folder())
return nil;
- NSString* title = base::SysUTF16ToNSString(node->GetTitleAsString16());
+ NSString* title = base::SysUTF16ToNSString(node->GetTitle());
NSMenu* menu = [[[NSMenu alloc] initWithTitle:title] autorelease];
[self addFolderNode:node toMenu:menu];
@@ -1105,7 +1105,7 @@ const NSTimeInterval kBookmarkBarAnimationDuration = 0.12;
[button setTarget:self];
[button setAction:@selector(openBookmark:)];
// Add a tooltip.
- NSString* title = base::SysUTF16ToNSString(node->GetTitleAsString16());
+ NSString* title = base::SysUTF16ToNSString(node->GetTitle());
std::string url_string = node->GetURL().possibly_invalid_spec();
NSString* tooltip = [NSString stringWithFormat:@"%@\n%s", title,
url_string.c_str()];
diff --git a/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm b/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm
index 13a110c..7c29c00 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm
+++ b/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm
@@ -1044,8 +1044,7 @@ TEST_F(BookmarkBarControllerTest, DropBookmarks) {
std::string my_string = parent->GetChild(i)->GetURL().spec();
EXPECT_NE(gurl_string.find(my_string), std::string::npos);
}
- EXPECT_EQ(parent->GetChild(i)->GetTitleAsString16(),
- ASCIIToUTF16(titles[i]));
+ EXPECT_EQ(parent->GetChild(i)->GetTitle(), ASCIIToUTF16(titles[i]));
}
}
@@ -1167,8 +1166,7 @@ TEST_F(BookmarkBarControllerTest, TestDragButton) {
EXPECT_EQ(1, folder->GetChildCount());
x = NSMidX([[[bar_ buttons] objectAtIndex:0] frame]);
x += [[bar_ view] frame].origin.x;
- string16 title =
- [[[bar_ buttons] objectAtIndex:2] bookmarkNode]->GetTitleAsString16();
+ string16 title = [[[bar_ buttons] objectAtIndex:2] bookmarkNode]->GetTitle();
[bar_ dragButton:[[bar_ buttons] objectAtIndex:2]
to:NSMakePoint(x, 0)
copy:NO];
@@ -1177,7 +1175,7 @@ TEST_F(BookmarkBarControllerTest, TestDragButton) {
// In the folder
EXPECT_EQ(2, folder->GetChildCount());
// At the end
- EXPECT_EQ(title, folder->GetChild(1)->GetTitleAsString16());
+ EXPECT_EQ(title, folder->GetChild(1)->GetTitle());
}
TEST_F(BookmarkBarControllerTest, TestCopyButton) {
@@ -1948,7 +1946,7 @@ TEST_F(BookmarkBarControllerDragDropTest, DragBookmarkData) {
ASSERT_TRUE(targetButton);
NSPoint targetPoint = [targetButton center];
newNode = other->GetChild(2); // Should be O4f.
- EXPECT_EQ(newNode->GetTitleAsString16(), ASCIIToUTF16("O4f"));
+ EXPECT_EQ(newNode->GetTitle(), ASCIIToUTF16("O4f"));
[bar_ setDragDataNode:newNode];
[dragInfo setDropLocation:targetPoint];
[bar_ dragBookmarkData:(id<NSDraggingInfo>)dragInfo.get()];
diff --git a/chrome/browser/cocoa/bookmark_bar_folder_controller.mm b/chrome/browser/cocoa/bookmark_bar_folder_controller.mm
index 26e498a..c915bc9 100644
--- a/chrome/browser/cocoa/bookmark_bar_folder_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bar_folder_controller.mm
@@ -261,7 +261,7 @@ const CGFloat kScrollWindowVerticalMargin = 0.0;
[button setTarget:self];
[button setAction:@selector(openBookmark:)];
// Add a tooltip.
- NSString* title = base::SysUTF16ToNSString(node->GetTitleAsString16());
+ NSString* title = base::SysUTF16ToNSString(node->GetTitle());
std::string urlString = node->GetURL().possibly_invalid_spec();
NSString* tooltip = [NSString stringWithFormat:@"%@\n%s", title,
urlString.c_str()];
diff --git a/chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm b/chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm
index b84cc58..3d46a62 100644
--- a/chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm
+++ b/chrome/browser/cocoa/bookmark_bar_folder_controller_unittest.mm
@@ -1311,7 +1311,7 @@ TEST_F(BookmarkBarFolderControllerMenuTest, DragBookmarkData) {
targetButton = [folderController buttonWithTitleEqualTo:@"2f2f"];
ASSERT_TRUE(targetButton);
newNode = other->GetChild(2); // Should be O4f.
- EXPECT_EQ(newNode->GetTitleAsString16(), ASCIIToUTF16("O4f"));
+ EXPECT_EQ(newNode->GetTitle(), ASCIIToUTF16("O4f"));
[folderController setDragDataNode:newNode];
[dragInfo setDropLocation:[targetButton center]];
[folderController dragBookmarkData:(id<NSDraggingInfo>)dragInfo.get()];
diff --git a/chrome/browser/cocoa/bookmark_bubble_controller.mm b/chrome/browser/cocoa/bookmark_bubble_controller.mm
index 4b8d154..0258d0d 100644
--- a/chrome/browser/cocoa/bookmark_bubble_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bubble_controller.mm
@@ -278,7 +278,7 @@ void BookmarkBubbleNotificationBridge::Observe(
- (IBAction)remove:(id)sender {
[self stopPulsingBookmarkButton];
// TODO(viettrungluu): get rid of conversion and utf_string_conversions.h.
- model_->SetURLStarred(node_->GetURL(), node_->GetTitleAsString16(), false);
+ model_->SetURLStarred(node_->GetURL(), node_->GetTitle(), false);
UserMetrics::RecordAction(UserMetricsAction("BookmarkBubble_Unstar"),
model_->profile());
node_ = NULL; // no longer valid
@@ -323,7 +323,7 @@ void BookmarkBubbleNotificationBridge::Observe(
if (!node_) return;
// First the title...
- NSString* oldTitle = base::SysUTF16ToNSString(node_->GetTitleAsString16());
+ NSString* oldTitle = base::SysUTF16ToNSString(node_->GetTitle());
NSString* newTitle = [nameTextField_ stringValue];
if (![oldTitle isEqual:newTitle]) {
model_->SetTitle(node_, base::SysNSStringToUTF16(newTitle));
@@ -352,8 +352,7 @@ void BookmarkBubbleNotificationBridge::Observe(
// Fill in all information related to the folder pop up button.
- (void)fillInFolderList {
- [nameTextField_
- setStringValue:base::SysUTF16ToNSString(node_->GetTitleAsString16())];
+ [nameTextField_ setStringValue:base::SysUTF16ToNSString(node_->GetTitle())];
DCHECK([folderPopUpButton_ numberOfItems] == 0);
[self addFolderNodes:model_->root_node()
toPopUpButton:folderPopUpButton_
@@ -387,7 +386,7 @@ void BookmarkBubbleNotificationBridge::Observe(
toPopUpButton:(NSPopUpButton*)button
indentation:(int)indentation {
if (!model_->is_root(parent)) {
- NSString* title = base::SysUTF16ToNSString(parent->GetTitleAsString16());
+ NSString* title = base::SysUTF16ToNSString(parent->GetTitle());
NSMenu* menu = [button menu];
NSMenuItem* item = [menu addItemWithTitle:title
action:NULL
diff --git a/chrome/browser/cocoa/bookmark_bubble_controller_unittest.mm b/chrome/browser/cocoa/bookmark_bubble_controller_unittest.mm
index 7dd01d9..2c445f3 100644
--- a/chrome/browser/cocoa/bookmark_bubble_controller_unittest.mm
+++ b/chrome/browser/cocoa/bookmark_bubble_controller_unittest.mm
@@ -276,8 +276,8 @@ TEST_F(BookmarkBubbleControllerTest, TestUserEdit) {
[controller edit:controller];
// Make sure bookmark has changed
- EXPECT_EQ(node->GetTitleAsString16(), ASCIIToUTF16("oops"));
- EXPECT_EQ(node->GetParent()->GetTitleAsString16(), ASCIIToUTF16("grandma"));
+ EXPECT_EQ(node->GetTitle(), ASCIIToUTF16("oops"));
+ EXPECT_EQ(node->GetParent()->GetTitle(), ASCIIToUTF16("grandma"));
}
// Confirm happiness with parent nodes that have the same name.
diff --git a/chrome/browser/cocoa/bookmark_button_cell.mm b/chrome/browser/cocoa/bookmark_button_cell.mm
index cc03904..368f34f 100644
--- a/chrome/browser/cocoa/bookmark_button_cell.mm
+++ b/chrome/browser/cocoa/bookmark_button_cell.mm
@@ -48,7 +48,7 @@
[self setBookmarkNode:node];
if (node) {
- NSString* title = base::SysUTF16ToNSString(node->GetTitleAsString16());
+ NSString* title = base::SysUTF16ToNSString(node->GetTitle());
[self setBookmarkCellText:title image:cellImage];
[self setMenu:contextMenu];
} else {
diff --git a/chrome/browser/cocoa/bookmark_editor_base_controller.mm b/chrome/browser/cocoa/bookmark_editor_base_controller.mm
index 044233e..03a7942 100644
--- a/chrome/browser/cocoa/bookmark_editor_base_controller.mm
+++ b/chrome/browser/cocoa/bookmark_editor_base_controller.mm
@@ -395,8 +395,7 @@ class BookmarkEditorBaseControllerBridge : public BookmarkModelObserver {
for (int i = 0; i < childCount; ++i) {
const BookmarkNode* childNode = node->GetChild(i);
if (childNode->type() != BookmarkNode::URL) {
- NSString* childName =
- base::SysUTF16ToNSString(childNode->GetTitleAsString16());
+ NSString* childName = base::SysUTF16ToNSString(childNode->GetTitle());
NSMutableArray* children = [self addChildFoldersFromNode:childNode];
BookmarkFolderInfo* folderInfo =
[BookmarkFolderInfo bookmarkFolderInfoWithFolderName:childName
diff --git a/chrome/browser/cocoa/bookmark_editor_controller.mm b/chrome/browser/cocoa/bookmark_editor_controller.mm
index 5461640..90b47ed 100644
--- a/chrome/browser/cocoa/bookmark_editor_controller.mm
+++ b/chrome/browser/cocoa/bookmark_editor_controller.mm
@@ -48,7 +48,7 @@
// Set text fields to match our bookmark. If the node is NULL we
// arrived here from an "Add Page..." item in a context menu.
if (node_) {
- [self setInitialName:base::SysUTF16ToNSString(node_->GetTitleAsString16())];
+ [self setInitialName:base::SysUTF16ToNSString(node_->GetTitle())];
std::string url_string = node_->GetURL().possibly_invalid_spec();
initialUrl_.reset([[NSString stringWithUTF8String:url_string.c_str()]
retain]);
diff --git a/chrome/browser/cocoa/bookmark_editor_controller_unittest.mm b/chrome/browser/cocoa/bookmark_editor_controller_unittest.mm
index 385adae..8c826ac 100644
--- a/chrome/browser/cocoa/bookmark_editor_controller_unittest.mm
+++ b/chrome/browser/cocoa/bookmark_editor_controller_unittest.mm
@@ -52,7 +52,7 @@ TEST_F(BookmarkEditorControllerTest, NoEdit) {
[controller_ cancel:nil];
ASSERT_EQ(default_parent_->GetChildCount(), 1);
const BookmarkNode* child = default_parent_->GetChild(0);
- EXPECT_EQ(child->GetTitleAsString16(), default_title_);
+ EXPECT_EQ(child->GetTitle(), default_title_);
EXPECT_EQ(child->GetURL(), GURL(default_name_));
}
@@ -61,7 +61,7 @@ TEST_F(BookmarkEditorControllerTest, EditTitle) {
[controller_ ok:nil];
ASSERT_EQ(default_parent_->GetChildCount(), 1);
const BookmarkNode* child = default_parent_->GetChild(0);
- EXPECT_EQ(child->GetTitleAsString16(), ASCIIToUTF16("whamma jamma bamma"));
+ EXPECT_EQ(child->GetTitle(), ASCIIToUTF16("whamma jamma bamma"));
EXPECT_EQ(child->GetURL(), GURL(default_name_));
}
@@ -72,7 +72,7 @@ TEST_F(BookmarkEditorControllerTest, EditURL) {
[controller_ ok:nil];
ASSERT_EQ(default_parent_->GetChildCount(), 1);
const BookmarkNode* child = default_parent_->GetChild(0);
- EXPECT_EQ(child->GetTitleAsString16(), default_title_);
+ EXPECT_EQ(child->GetTitle(), default_title_);
EXPECT_EQ(child->GetURL(), GURL("http://yellow-sneakers.com/"));
}
@@ -388,7 +388,7 @@ TEST_F(BookmarkEditorControllerTreeTest, ChangeNameAndBookmarkGroup) {
ASSERT_EQ(parent, group_c_);
int childIndex = parent->IndexOfChild(bookmark_bb_3_);
ASSERT_EQ(4, childIndex);
- EXPECT_EQ(bookmark_bb_3_->GetTitleAsString16(), ASCIIToUTF16("NEW NAME"));
+ EXPECT_EQ(bookmark_bb_3_->GetTitle(), ASCIIToUTF16("NEW NAME"));
}
TEST_F(BookmarkEditorControllerTreeTest, AddFolderWithGroupSelected) {
@@ -418,6 +418,6 @@ TEST_F(BookmarkEditorControllerTreeNoNodeTest, NewBookmarkNoNode) {
[controller_ ok:nil];
const BookmarkNode* new_node = group_bb_->GetChild(5);
ASSERT_EQ(0, new_node->GetChildCount());
- EXPECT_EQ(new_node->GetTitleAsString16(), ASCIIToUTF16("NEW BOOKMARK"));
+ EXPECT_EQ(new_node->GetTitle(), ASCIIToUTF16("NEW BOOKMARK"));
EXPECT_EQ(new_node->GetURL(), GURL("http://NEWURL.com"));
}
diff --git a/chrome/browser/cocoa/bookmark_folder_target.mm b/chrome/browser/cocoa/bookmark_folder_target.mm
index 7e957d2..2380b49 100644
--- a/chrome/browser/cocoa/bookmark_folder_target.mm
+++ b/chrome/browser/cocoa/bookmark_folder_target.mm
@@ -79,7 +79,7 @@ NSString* kBookmarkButtonDragType = @"ChromiumBookmarkButtonDragType";
} else {
const std::string spec = node->GetURL().spec();
NSString* url = base::SysUTF8ToNSString(spec);
- NSString* title = base::SysUTF16ToNSString(node->GetTitleAsString16());
+ NSString* title = base::SysUTF16ToNSString(node->GetTitle());
[pboard declareURLPasteboardWithAdditionalTypes:[NSArray array]
owner:nil];
[pboard setDataForURL:url title:title];
diff --git a/chrome/browser/cocoa/bookmark_menu_bridge.mm b/chrome/browser/cocoa/bookmark_menu_bridge.mm
index cc11a47..493e5e8 100644
--- a/chrome/browser/cocoa/bookmark_menu_bridge.mm
+++ b/chrome/browser/cocoa/bookmark_menu_bridge.mm
@@ -222,7 +222,7 @@ void BookmarkMenuBridge::ConfigureMenuItem(const BookmarkNode* node,
// Add a tooltip
std::string url_string = node->GetURL().possibly_invalid_spec();
NSString* tooltip = [NSString stringWithFormat:@"%@\n%s",
- base::SysUTF16ToNSString(node->GetTitleAsString16()),
+ base::SysUTF16ToNSString(node->GetTitle()),
url_string.c_str()];
[item setToolTip:tooltip];
diff --git a/chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm b/chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm
index 0acbc4b..6eae73c 100644
--- a/chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm
+++ b/chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm
@@ -31,8 +31,7 @@ const NSUInteger kMaximumMenuPixelsWide = 300;
NSFont* nsfont = [NSFont menuBarFontOfSize:0]; // 0 means "default"
gfx::Font font(base::SysNSStringToWide([nsfont fontName]),
static_cast<int>([nsfont pointSize]));
- std::wstring title = gfx::ElideText(UTF16ToWideHack(
- node->GetTitleAsString16()),
+ std::wstring title = gfx::ElideText(UTF16ToWideHack(node->GetTitle()),
font,
kMaximumMenuPixelsWide,
false);
diff --git a/chrome/browser/cocoa/bookmark_name_folder_controller.mm b/chrome/browser/cocoa/bookmark_name_folder_controller.mm
index c2c0f54..a854b8f 100644
--- a/chrome/browser/cocoa/bookmark_name_folder_controller.mm
+++ b/chrome/browser/cocoa/bookmark_name_folder_controller.mm
@@ -32,8 +32,7 @@
DCHECK_LE(newIndex, parent->GetChildCount());
}
if (node_) {
- initialName_.reset(
- [base::SysUTF16ToNSString(node_->GetTitleAsString16()) retain]);
+ initialName_.reset([base::SysUTF16ToNSString(node_->GetTitle()) retain]);
} else {
NSString* newString =
l10n_util::GetNSStringWithFixup(IDS_BOOMARK_EDITOR_NEW_FOLDER_NAME);
diff --git a/chrome/browser/cocoa/bookmark_name_folder_controller_unittest.mm b/chrome/browser/cocoa/bookmark_name_folder_controller_unittest.mm
index 9419b8f..f78cf22 100644
--- a/chrome/browser/cocoa/bookmark_name_folder_controller_unittest.mm
+++ b/chrome/browser/cocoa/bookmark_name_folder_controller_unittest.mm
@@ -46,7 +46,7 @@ TEST_F(BookmarkNameFolderControllerTest, AddNew) {
[controller ok:nil];
EXPECT_EQ(1, parent->GetChildCount());
EXPECT_TRUE(parent->GetChild(0)->is_folder());
- EXPECT_EQ(ASCIIToUTF16("Bozo"), parent->GetChild(0)->GetTitleAsString16());
+ EXPECT_EQ(ASCIIToUTF16("Bozo"), parent->GetChild(0)->GetTitle());
}
// Add new but specify a sibling.
@@ -76,7 +76,7 @@ TEST_F(BookmarkNameFolderControllerTest, AddNewWithSibling) {
// Confirm we now have 3, and that the new one is in the middle.
EXPECT_EQ(3, parent->GetChildCount());
EXPECT_TRUE(parent->GetChild(1)->is_folder());
- EXPECT_EQ(ASCIIToUTF16("middle"), parent->GetChild(1)->GetTitleAsString16());
+ EXPECT_EQ(ASCIIToUTF16("middle"), parent->GetChild(1)->GetTitle());
}
// Make sure we are allowed to create a folder named "New Folder".
@@ -142,7 +142,7 @@ TEST_F(BookmarkNameFolderControllerTest, Rename) {
[controller ok:nil];
EXPECT_EQ(1, parent->GetChildCount());
EXPECT_TRUE(parent->GetChild(0)->is_folder());
- EXPECT_EQ(ASCIIToUTF16("Zobo"), parent->GetChild(0)->GetTitleAsString16());
+ EXPECT_EQ(ASCIIToUTF16("Zobo"), parent->GetChild(0)->GetTitle());
}
TEST_F(BookmarkNameFolderControllerTest, EditAndConfirmOKButton) {
diff --git a/chrome/browser/cocoa/collected_cookies_mac.mm b/chrome/browser/cocoa/collected_cookies_mac.mm
index e01c62d..671bf87 100644
--- a/chrome/browser/cocoa/collected_cookies_mac.mm
+++ b/chrome/browser/cocoa/collected_cookies_mac.mm
@@ -230,7 +230,7 @@ void CollectedCookiesMac::OnSheetDidEnd(NSWindow* sheet) {
setting);
if (!lastDomain.empty())
multipleDomainsChanged = YES;
- lastDomain = origin_node->GetTitleAsString16();
+ lastDomain = origin_node->GetTitle();
}
if (multipleDomainsChanged)
[self showInfoBarForMultipleDomainsAndSetting:setting];
diff --git a/chrome/browser/cocoa/cookie_tree_node.mm b/chrome/browser/cocoa/cookie_tree_node.mm
index 114f739..4b0dd6f 100644
--- a/chrome/browser/cocoa/cookie_tree_node.mm
+++ b/chrome/browser/cocoa/cookie_tree_node.mm
@@ -18,8 +18,7 @@
}
- (void)rebuild {
- title_.reset(
- [base::SysUTF16ToNSString(treeNode_->GetTitleAsString16()) retain]);
+ title_.reset([base::SysUTF16ToNSString(treeNode_->GetTitle()) retain]);
children_.reset();
// The tree node assumes ownership of the cookie details object
details_.reset([[CocoaCookieDetails createFromCookieTreeNode:(treeNode_)]
diff --git a/chrome/browser/cocoa/extension_installed_bubble_controller.mm b/chrome/browser/cocoa/extension_installed_bubble_controller.mm
index 511fba4..4a22436 100644
--- a/chrome/browser/cocoa/extension_installed_bubble_controller.mm
+++ b/chrome/browser/cocoa/extension_installed_bubble_controller.mm
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "base/mac_util.h"
#include "base/sys_string_conversions.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/cocoa/browser_window_cocoa.h"