diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 06:14:17 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 06:14:17 +0000 |
commit | 9f284f13fd93a37bd8afa4840e91a953f4c9bc51 (patch) | |
tree | 4a5e7e73c5ed978b2e18569080a70c18a821da76 /app/text_elider.cc | |
parent | f33fdc5d17ae9e0439d2e68344da6d5f12dc26a5 (diff) | |
download | chromium_src-9f284f13fd93a37bd8afa4840e91a953f4c9bc51.zip chromium_src-9f284f13fd93a37bd8afa4840e91a953f4c9bc51.tar.gz chromium_src-9f284f13fd93a37bd8afa4840e91a953f4c9bc51.tar.bz2 |
Remove the wstring FormatUrl() functions (and convert remaining users to the string16 verison).
Still to do: Actually convert the code underlying FormatUrl().
BUG=23581
TEST=builds and passes tests
Review URL: http://codereview.chromium.org/3263005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57968 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/text_elider.cc')
-rw-r--r-- | app/text_elider.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/text_elider.cc b/app/text_elider.cc index 995ac95..549e1c2 100644 --- a/app/text_elider.cc +++ b/app/text_elider.cc @@ -64,8 +64,9 @@ std::wstring ElideUrl(const GURL& url, const std::wstring& languages) { // Get a formatted string and corresponding parsing of the url. url_parse::Parsed parsed; - std::wstring url_string = net::FormatUrl(url, languages, - net::kFormatUrlOmitAll, UnescapeRule::SPACES, &parsed, NULL, NULL); + std::wstring url_string = UTF16ToWideHack(net::FormatUrl(url, + WideToUTF8(languages), net::kFormatUrlOmitAll, UnescapeRule::SPACES, + &parsed, NULL, NULL)); if (available_pixel_width <= 0) return url_string; @@ -377,6 +378,7 @@ std::wstring ElideText(const std::wstring& text, return CutString(text, lo, elide_in_middle, true); } +// TODO(viettrungluu): convert |languages| to an |std::string|. SortedDisplayURL::SortedDisplayURL(const GURL& url, const std::wstring& languages) { std::wstring host; @@ -384,9 +386,9 @@ SortedDisplayURL::SortedDisplayURL(const GURL& url, sort_host_ = WideToUTF16Hack(host); string16 host_minus_www = WideToUTF16Hack(net::StripWWW(host)); url_parse::Parsed parsed; - display_url_ = WideToUTF16Hack(net::FormatUrl(url, languages, + display_url_ = net::FormatUrl(url, WideToUTF8(languages), net::kFormatUrlOmitAll, UnescapeRule::SPACES, &parsed, &prefix_end_, - NULL)); + NULL); if (sort_host_.length() > host_minus_www.length()) { prefix_end_ += sort_host_.length() - host_minus_www.length(); sort_host_.swap(host_minus_www); |