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

Unified Diff: chrome/browser/ui/omnibox/location_bar_util.cc

Issue 5742006: wstrings: make l10n_util::TruncateString use string16 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/location_bar_util.cc
diff --git a/chrome/browser/ui/omnibox/location_bar_util.cc b/chrome/browser/ui/omnibox/location_bar_util.cc
index 66ceb4b81a6ae344534704de4ff30703fc3e7c7a..a5e94042ad9b9cf1288a3ee9b3345d2eff2c4c88 100644
--- a/chrome/browser/ui/omnibox/location_bar_util.cc
+++ b/chrome/browser/ui/omnibox/location_bar_util.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "base/i18n/rtl.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_model.h"
@@ -31,7 +32,8 @@ std::wstring CalculateMinString(const std::wstring& description) {
std::wstring min_string;
if (chop_index == std::wstring::npos) {
// No dot or whitespace, truncate to at most 3 chars.
- min_string = l10n_util::TruncateString(description, 3);
+ min_string = UTF16ToWideHack(
+ l10n_util::TruncateString(WideToUTF16Hack(description), 3));
} else {
min_string = description.substr(0, chop_index);
}
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698