Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6842)

Unified Diff: chrome/browser/views/shelf_item_dialog.cc

Issue 115759: Show Unicode IDNs for "On startup" setting and "Add page" dialog for it.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/options/general_page_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/shelf_item_dialog.cc
===================================================================
--- chrome/browser/views/shelf_item_dialog.cc (revision 16848)
+++ chrome/browser/views/shelf_item_dialog.cc (working copy)
@@ -494,8 +494,14 @@
void ShelfItemDialog::OnSelectionChanged() {
int selection = url_table_->FirstSelectedRow();
if (selection >= 0 && selection < url_table_model_->RowCount()) {
- url_field_->SetText(
- UTF8ToWide(url_table_model_->GetURL(selection).spec()));
+ std::wstring languages =
+ profile_->GetPrefs()->GetString(prefs::kAcceptLanguages);
+ // Because the url_field_ is user-editable, we set the URL with
+ // username:password and escaped path and query.
+ std::wstring formatted = net::FormatUrl(
+ url_table_model_->GetURL(selection), languages,
+ false, false, NULL, NULL);
+ url_field_->SetText(formatted);
if (title_field_)
title_field_->SetText(url_table_model_->GetTitle(selection));
GetDialogClientView()->UpdateDialogButtons();
« no previous file with comments | « chrome/browser/views/options/general_page_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698