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 /chrome/browser/tab_contents | |
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 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/navigation_controller.cc | 6 | ||||
-rw-r--r-- | chrome/browser/tab_contents/navigation_entry.cc | 10 | ||||
-rw-r--r-- | chrome/browser/tab_contents/render_view_context_menu.cc | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/tab_contents/navigation_controller.cc b/chrome/browser/tab_contents/navigation_controller.cc index e1667e2..a416bc9 100644 --- a/chrome/browser/tab_contents/navigation_controller.cc +++ b/chrome/browser/tab_contents/navigation_controller.cc @@ -250,9 +250,9 @@ NavigationEntry* NavigationController::CreateNavigationEntry( // Use the filename as the title, not the full path. // We need to call FormatUrl() to perform URL de-escaping; // it's a bit ugly to grab the filename out of the resulting string. - std::wstring languages = UTF8ToWide(profile->GetPrefs()->GetString( - prefs::kAcceptLanguages)); - std::wstring formatted = net::FormatUrl(url, languages); + std::string languages = + profile->GetPrefs()->GetString(prefs::kAcceptLanguages); + std::wstring formatted = UTF16ToWideHack(net::FormatUrl(url, languages)); std::wstring filename = FilePath::FromWStringHack(formatted).BaseName().ToWStringHack(); entry->set_title(WideToUTF16Hack(filename)); diff --git a/chrome/browser/tab_contents/navigation_entry.cc b/chrome/browser/tab_contents/navigation_entry.cc index 0933f1e..c345958 100644 --- a/chrome/browser/tab_contents/navigation_entry.cc +++ b/chrome/browser/tab_contents/navigation_entry.cc @@ -89,20 +89,20 @@ const string16& NavigationEntry::GetTitleForDisplay( return cached_display_title_; // Use the virtual URL first if any, and fall back on using the real URL. - std::wstring languages; + std::string languages; if (navigation_controller) { - languages = UTF8ToWide(navigation_controller->profile()->GetPrefs()-> - GetString(prefs::kAcceptLanguages)); + languages = navigation_controller->profile()->GetPrefs()-> + GetString(prefs::kAcceptLanguages); } - std::wstring title; + string16 title; std::wstring elided_title; if (!virtual_url_.is_empty()) { title = net::FormatUrl(virtual_url_, languages); } else if (!url_.is_empty()) { title = net::FormatUrl(url_, languages); } - ElideString(title, chrome::kMaxTitleChars, &elided_title); + ElideString(UTF16ToWideHack(title), chrome::kMaxTitleChars, &elided_title); cached_display_title_ = WideToUTF16Hack(elided_title); return cached_display_title_; } diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index 5b8151d..84ba4c4 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -1454,7 +1454,7 @@ void RenderViewContextMenu::Inspect(int x, int y) { void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) { chrome_browser_net::WriteURLToClipboard( url, - UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)), + profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), g_browser_process->clipboard()); } |