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

Unified Diff: chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm

Issue 6258015: Remove wstring from autocomplete.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/ui/cocoa/location_bar/selected_keyword_decoration.mm
===================================================================
--- chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm (revision 72331)
+++ chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm (working copy)
@@ -46,23 +46,23 @@
return GetWidthForImageAndLabel(nil, partial_string_);
}
-void SelectedKeywordDecoration::SetKeyword(const std::wstring& short_name,
+void SelectedKeywordDecoration::SetKeyword(const string16& short_name,
bool is_extension_keyword) {
- const std::wstring min_name(
- location_bar_util::CalculateMinString(short_name));
+ const string16 min_name(WideToUTF16Hack(
+ location_bar_util::CalculateMinString(UTF16ToWideHack(short_name))));
const int message_id = is_extension_keyword ?
IDS_OMNIBOX_EXTENSION_KEYWORD_TEXT : IDS_OMNIBOX_KEYWORD_TEXT;
// The text will be like "Search <name>:". "<name>" is a parameter
// derived from |short_name|.
full_string_.reset(
- [l10n_util::GetNSStringF(message_id, WideToUTF16(short_name)) copy]);
+ [l10n_util::GetNSStringF(message_id, short_name) copy]);
if (min_name.empty()) {
partial_string_.reset();
} else {
partial_string_.reset(
- [l10n_util::GetNSStringF(message_id, WideToUTF16(min_name)) copy]);
+ [l10n_util::GetNSStringF(message_id, min_name) copy]);
}
}

Powered by Google App Engine
This is Rietveld 408576698