Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7879)

Unified Diff: chrome/browser/tab_contents/render_view_context_menu_mac.mm

Issue 126223: Replace std:;wstring with std::string in locale-name related APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/render_view_context_menu_mac.mm
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu_mac.mm (revision 19124)
+++ chrome/browser/tab_contents/render_view_context_menu_mac.mm (working copy)
@@ -68,10 +68,10 @@
// TODO(pinkerton): Do we want to do anything like make a maximum string width
// and middle-truncate?
NSString* RenderViewContextMenuMac::PrepareLabelForDisplay(
- const std::wstring& label) {
+ const string16& label) {
// Strip out any "&"'s that are windows accelerators and we don't use.
NSMutableString* title =
- [NSMutableString stringWithString:base::SysWideToNSString(label)];
+ [NSMutableString stringWithString:base::SysUTF16ToNSString(label)];
DCHECK(title);
NSRange range = NSMakeRange(0, [title length]);
[title replaceOccurrencesOfString:@"&" withString:@"" options:0 range:range];
@@ -79,11 +79,11 @@
}
void RenderViewContextMenuMac::AppendMenuItem(int command_id) {
- AppendMenuItem(command_id, l10n_util::GetString(command_id));
+ AppendMenuItem(command_id, l10n_util::GetStringUTF16(command_id));
}
void RenderViewContextMenuMac::AppendMenuItem(int command_id,
- const std::wstring& label) {
+ const string16& label) {
// Create the item and set its target/action to |target_| with the command
// as |command_id|. Then add it to the menu at the end.
NSMenuItem* item =
@@ -97,12 +97,12 @@
}
void RenderViewContextMenuMac::AppendRadioMenuItem(int id,
- const std::wstring& label) {
+ const string16& label) {
NOTIMPLEMENTED();
}
void RenderViewContextMenuMac::AppendCheckboxMenuItem(int id,
- const std::wstring& label) {
+ const string16& label) {
NOTIMPLEMENTED();
}
@@ -112,7 +112,7 @@
}
void RenderViewContextMenuMac::StartSubMenu(int command_id,
- const std::wstring& label) {
+ const string16& label) {
// I'm not a fan of this kind of API, but the other platforms have similar
// guards so at least we know everyone will break together if someone
// tries to mis-use the API.
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu_mac.h ('k') | chrome/browser/views/options/fonts_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698