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

Unified Diff: chrome/browser/tab_contents/navigation_controller.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, 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/net/url_fixer_upper.cc ('k') | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/navigation_controller.cc
===================================================================
--- chrome/browser/tab_contents/navigation_controller.cc (revision 17365)
+++ chrome/browser/tab_contents/navigation_controller.cc (working copy)
@@ -18,9 +18,13 @@
#include "chrome/browser/tab_contents/site_instance.h"
#include "chrome/common/navigation_types.h"
#include "chrome/common/notification_service.h"
+#include "chrome/common/pref_names.h"
+#include "chrome/common/pref_service.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "grit/app_resources.h"
+#include "net/base/escape.h"
+#include "net/base/net_util.h"
#include "webkit/glue/webkit_glue.h"
#if defined(OS_WIN)
@@ -354,8 +358,10 @@
entry->set_display_url(url);
entry->set_user_typed_url(url);
if (url.SchemeIsFile()) {
+ std::wstring languages = profile()->GetPrefs()->GetString(
+ prefs::kAcceptLanguages);
entry->set_title(WideToUTF16Hack(
- file_util::GetFilenameFromPath(UTF8ToWide(url.host() + url.path()))));
+ file_util::GetFilenameFromPath(net::FormatUrl(url, languages))));
}
return entry;
}
« no previous file with comments | « chrome/browser/net/url_fixer_upper.cc ('k') | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698