summaryrefslogtreecommitdiffstats
path: root/chrome/browser/toolbar_model.cc
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 06:14:17 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 06:14:17 +0000
commit9f284f13fd93a37bd8afa4840e91a953f4c9bc51 (patch)
tree4a5e7e73c5ed978b2e18569080a70c18a821da76 /chrome/browser/toolbar_model.cc
parentf33fdc5d17ae9e0439d2e68344da6d5f12dc26a5 (diff)
downloadchromium_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/toolbar_model.cc')
-rw-r--r--chrome/browser/toolbar_model.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/toolbar_model.cc b/chrome/browser/toolbar_model.cc
index 5d6185b..e8cdaaf 100644
--- a/chrome/browser/toolbar_model.cc
+++ b/chrome/browser/toolbar_model.cc
@@ -33,13 +33,12 @@ ToolbarModel::~ToolbarModel() {
// ToolbarModel Implementation.
std::wstring ToolbarModel::GetText() const {
GURL url(chrome::kAboutBlankURL);
- std::wstring languages; // Empty if we don't have a |navigation_controller|.
+ std::string languages; // Empty if we don't have a |navigation_controller|.
NavigationController* navigation_controller = GetNavigationController();
if (navigation_controller) {
- languages = UTF8ToWide(
- navigation_controller->profile()->GetPrefs()->GetString(
- prefs::kAcceptLanguages));
+ languages = navigation_controller->profile()->GetPrefs()->GetString(
+ prefs::kAcceptLanguages);
NavigationEntry* entry = navigation_controller->GetActiveEntry();
if (!navigation_controller->tab_contents()->ShouldDisplayURL()) {
// Explicitly hide the URL for this tab.
@@ -54,8 +53,8 @@ std::wstring ToolbarModel::GetText() const {
// and pastes it into another program, that program may think the URL ends at
// the space.
return AutocompleteInput::FormattedStringWithEquivalentMeaning(url,
- net::FormatUrl(url, languages, net::kFormatUrlOmitAll,
- UnescapeRule::NORMAL, NULL, NULL, NULL));
+ UTF16ToWideHack(net::FormatUrl(url, languages, net::kFormatUrlOmitAll,
+ UnescapeRule::NORMAL, NULL, NULL, NULL)));
}
ToolbarModel::SecurityLevel ToolbarModel::GetSecurityLevel() const {