summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-21 16:47:44 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-21 16:47:44 +0000
commit4926e54ada598ecce30237b2e4d0ad5580709536 (patch)
treef7c2defd33c6e6fe2d461f3092b9f47e7f959178 /chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm
parentd7828c27c67a11e316b6ba8679ac91300715d97e (diff)
downloadchromium_src-4926e54ada598ecce30237b2e4d0ad5580709536.zip
chromium_src-4926e54ada598ecce30237b2e4d0ad5580709536.tar.gz
chromium_src-4926e54ada598ecce30237b2e4d0ad5580709536.tar.bz2
Remove wstrings from bookmarks, part 8.
Convert lots of uses of the wstring BookmarkNode::GetTitle() in browser/cocoa. BUG=23581 TEST=builds and passes Review URL: http://codereview.chromium.org/3113028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56996 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm')
-rw-r--r--chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm b/chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm
index adae210..0acbc4b 100644
--- a/chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm
+++ b/chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm
@@ -6,6 +6,7 @@
#include "app/text_elider.h"
#include "base/sys_string_conversions.h"
+#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_dll_resource.h" // IDC_BOOKMARK_MENU
#import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -30,7 +31,8 @@ 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(node->GetTitle(),
+ std::wstring title = gfx::ElideText(UTF16ToWideHack(
+ node->GetTitleAsString16()),
font,
kMaximumMenuPixelsWide,
false);