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

Unified Diff: content/browser/tab_contents/navigation_controller.cc

Issue 6591127: fix display of filenames in file:/// URLs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whitespace Created 9 years, 10 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 | « no previous file | content/browser/tab_contents/navigation_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/navigation_controller.cc
diff --git a/content/browser/tab_contents/navigation_controller.cc b/content/browser/tab_contents/navigation_controller.cc
index 7601d2311fb7745c3cf5225e8649b6bcca5963b2..9eec1ad9cf8814d0f3cc380ff2376148ccbd24c3 100644
--- a/content/browser/tab_contents/navigation_controller.cc
+++ b/content/browser/tab_contents/navigation_controller.cc
@@ -243,17 +243,6 @@ NavigationEntry* NavigationController::CreateNavigationEntry(
entry->set_virtual_url(url);
entry->set_user_typed_url(url);
entry->set_update_virtual_url_with_url(reverse_on_redirect);
- if (url.SchemeIsFile()) {
- // Use the filename as the title, not the full path.
- // We need to call FormatUrl() to perform URL de-escaping;
- // it's a bit ugly to grab the filename out of the resulting string.
- std::string languages =
- profile->GetPrefs()->GetString(prefs::kAcceptLanguages);
- std::wstring formatted = UTF16ToWideHack(net::FormatUrl(url, languages));
- std::wstring filename =
- FilePath::FromWStringHack(formatted).BaseName().ToWStringHack();
- entry->set_title(WideToUTF16Hack(filename));
- }
return entry;
}
« no previous file with comments | « no previous file | content/browser/tab_contents/navigation_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698