diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-10 19:06:21 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-10 19:06:21 +0000 |
commit | 52fcf3c789f31c2538fc94240d269f0e56ff6087 (patch) | |
tree | 7debd5844f9edda7fa456824d100714006293cad /chrome/browser/ui/omnibox | |
parent | a08e94a424db1cecf68845f5052fc9924ccc3b6a (diff) | |
download | chromium_src-52fcf3c789f31c2538fc94240d269f0e56ff6087.zip chromium_src-52fcf3c789f31c2538fc94240d269f0e56ff6087.tar.gz chromium_src-52fcf3c789f31c2538fc94240d269f0e56ff6087.tar.bz2 |
wstrings: make l10n_util::TruncateString use string16
BUG=23581
Review URL: http://codereview.chromium.org/5742006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68875 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/omnibox')
-rw-r--r-- | chrome/browser/ui/omnibox/location_bar_util.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/ui/omnibox/location_bar_util.cc b/chrome/browser/ui/omnibox/location_bar_util.cc index 66ceb4b..a5e9404 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); } |