| 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 018553e344ad66b58e555260bcb7ffbdc6744786..b1c70261f79e21985d885db74e81f3cc2ad964c6 100644
|
| --- a/chrome/browser/ui/omnibox/location_bar_util.cc
|
| +++ b/chrome/browser/ui/omnibox/location_bar_util.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -27,20 +27,20 @@ std::wstring GetKeywordName(Profile* profile, const std::wstring& keyword) {
|
| return std::wstring();
|
| }
|
|
|
| -std::wstring CalculateMinString(const std::wstring& description) {
|
| +string16 CalculateMinString(const string16& description) {
|
| // Chop at the first '.' or whitespace.
|
| const size_t dot_index = description.find('.');
|
| - const size_t ws_index = description.find_first_of(kWhitespaceWide);
|
| + const size_t ws_index = description.find_first_of(kWhitespaceUTF16);
|
| size_t chop_index = std::min(dot_index, ws_index);
|
| string16 min_string;
|
| - if (chop_index == std::wstring::npos) {
|
| + if (chop_index == string16::npos) {
|
| // No dot or whitespace, truncate to at most 3 chars.
|
| - min_string = ui::TruncateString(WideToUTF16Hack(description), 3);
|
| + min_string = ui::TruncateString(description, 3);
|
| } else {
|
| - min_string = WideToUTF16(description.substr(0, chop_index));
|
| + min_string = description.substr(0, chop_index);
|
| }
|
| base::i18n::AdjustStringForLocaleDirection(&min_string);
|
| - return UTF16ToWide(min_string);
|
| + return min_string;
|
| }
|
|
|
| } // namespace location_bar_util
|
|
|