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

Unified Diff: chrome/browser/ui/views/location_bar/selected_keyword_view.cc

Issue 10219009: Convert CalculateMinString() to string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/views/location_bar/selected_keyword_view.cc
diff --git a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
index b8edbafda867507fa658379589f2685e05889658..49cd3c3242731b791e8d28ed6eb5dd891e56eae2 100644
--- a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
+++ b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
@@ -6,9 +6,9 @@
#include "base/logging.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/omnibox/location_bar_util.h"
#include "chrome/browser/ui/views/location_bar/keyword_hint_view.h"
#include "grit/generated_resources.h"
@@ -68,9 +68,7 @@ void SelectedKeywordView::SetKeyword(const string16& keyword) {
IDS_OMNIBOX_EXTENSION_KEYWORD_TEXT : IDS_OMNIBOX_KEYWORD_TEXT;
full_label_.SetText(
l10n_util::GetStringFUTF16(message_id, short_name));
- const std::wstring min_string(
- location_bar_util::CalculateMinString(UTF16ToWide(short_name)));
+ const string16 min_string(location_bar_util::CalculateMinString(short_name));
partial_label_.SetText(min_string.empty() ?
- full_label_.text() :
- l10n_util::GetStringFUTF16(message_id, WideToUTF16(min_string)));
+ full_label_.text() : l10n_util::GetStringFUTF16(message_id, min_string));
}

Powered by Google App Engine
This is Rietveld 408576698