summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options
diff options
context:
space:
mode:
authorjungshik@google.com <jungshik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-27 05:36:25 +0000
committerjungshik@google.com <jungshik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-27 05:36:25 +0000
commitb9fe294776b6b5a1103cfa9a354895a95cae2738 (patch)
treef055d3f9b1441aa989c1551742ab0b364d5df958 /chrome/browser/views/options
parentaf173cc9bbac340328d2d4c85feafe304cfcc8ca (diff)
downloadchromium_src-b9fe294776b6b5a1103cfa9a354895a95cae2738.zip
chromium_src-b9fe294776b6b5a1103cfa9a354895a95cae2738.tar.gz
chromium_src-b9fe294776b6b5a1103cfa9a354895a95cae2738.tar.bz2
Show Unicode IDNs for "On startup" setting and "Add page" dialog for it.
TEST=visit an IDN URL, and open the "Basics" tab of the "Options" dialog, select "Open the following pages", press "Add..." button, select the IDN URL, and confirm that the URL field is shown in Unicode, or paste a Punycode URL to the URL field of the "Add page" dialog, press "Add" button, and confirm that the "Open the followig pages" list shows the Unicode URL. http://crbug.com/3991 Patch by tkent Original review: http://codereview.chromium.org/115759 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16974 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/options')
-rw-r--r--chrome/browser/views/options/general_page_view.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc
index fa44545..f315c27 100644
--- a/chrome/browser/views/options/general_page_view.cc
+++ b/chrome/browser/views/options/general_page_view.cc
@@ -31,6 +31,7 @@
#include "grit/app_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "net/base/net_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/controls/button/radio_button.h"
#include "views/controls/label.h"
@@ -301,9 +302,11 @@ int CustomHomePagesTableModel::RowCount() {
std::wstring CustomHomePagesTableModel::GetText(int row, int column_id) {
DCHECK(column_id == 0);
DCHECK(row >= 0 && row < RowCount());
+ std::wstring languages =
+ profile_->GetPrefs()->GetString(prefs::kAcceptLanguages);
// No need to force URL to have LTR directionality because the custom home
// pages control is created using LTR directionality.
- return UTF8ToWide(entries_[row].url.spec());
+ return net::FormatUrl(entries_[row].url, languages);
}
SkBitmap CustomHomePagesTableModel::GetIcon(int row) {