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

Side by Side Diff: chrome/browser/views/shelf_item_dialog.cc

Issue 56053: URL's not properly unescaping when displayed (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/bookmark_editor_view.cc ('k') | net/base/escape.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/views/shelf_item_dialog.h" 5 #include "chrome/browser/views/shelf_item_dialog.h"
6 6
7 #include "app/gfx/text_elider.h" 7 #include "app/gfx/text_elider.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/gfx/png_decoder.h" 10 #include "base/gfx/png_decoder.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 501
502 void ShelfItemDialog::OnSelectionChanged() { 502 void ShelfItemDialog::OnSelectionChanged() {
503 int selection = url_table_->FirstSelectedRow(); 503 int selection = url_table_->FirstSelectedRow();
504 if (selection >= 0 && selection < url_table_model_->RowCount()) { 504 if (selection >= 0 && selection < url_table_model_->RowCount()) {
505 std::wstring languages = 505 std::wstring languages =
506 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages); 506 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages);
507 // Because the url_field_ is user-editable, we set the URL with 507 // Because the url_field_ is user-editable, we set the URL with
508 // username:password and escaped path and query. 508 // username:password and escaped path and query.
509 std::wstring formatted = net::FormatUrl( 509 std::wstring formatted = net::FormatUrl(
510 url_table_model_->GetURL(selection), languages, 510 url_table_model_->GetURL(selection), languages,
511 false, false, NULL, NULL); 511 false, UnescapeRule::NONE, NULL, NULL);
512 url_field_->SetText(formatted); 512 url_field_->SetText(formatted);
513 if (title_field_) 513 if (title_field_)
514 title_field_->SetText(url_table_model_->GetTitle(selection)); 514 title_field_->SetText(url_table_model_->GetTitle(selection));
515 GetDialogClientView()->UpdateDialogButtons(); 515 GetDialogClientView()->UpdateDialogButtons();
516 } 516 }
517 } 517 }
518 518
519 void ShelfItemDialog::OnDoubleClick() { 519 void ShelfItemDialog::OnDoubleClick() {
520 int selection = url_table_->FirstSelectedRow(); 520 int selection = url_table_->FirstSelectedRow();
521 if (selection >= 0 && selection < url_table_model_->RowCount()) { 521 if (selection >= 0 && selection < url_table_model_->RowCount()) {
522 OnSelectionChanged(); 522 OnSelectionChanged();
523 PerformModelChange(); 523 PerformModelChange();
524 if (window()) 524 if (window())
525 window()->Close(); 525 window()->Close();
526 } 526 }
527 } 527 }
528 528
529 GURL ShelfItemDialog::GetInputURL() const { 529 GURL ShelfItemDialog::GetInputURL() const {
530 return GURL(URLFixerUpper::FixupURL(url_field_->text(), L"")); 530 return GURL(URLFixerUpper::FixupURL(url_field_->text(), L""));
531 } 531 }
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_editor_view.cc ('k') | net/base/escape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698