From 04c989443019bb446419ad28ba4d83c97b2cb7bf Mon Sep 17 00:00:00 2001 From: "glen@chromium.org" Date: Sat, 1 Nov 2008 22:57:52 +0000 Subject: Unescape and use the filename when we have no title to display for a given entry (instead of displaying the whole path). This unifies the display of titles for local and remote files. For anyone watching, this is how tab titles will change: 'http://blah.com/index.html' will be 'index.html' 'http://blah.com/meat%20pie.pdf' will be 'meat pie.pdf' 'file://C:/blah/blue%20cheese.txt' will be 'blue cheese.txt' (previously this sometimes changed between the URL and blue%20cheese.txt depending on how the file was opened). BUG=2529,2375 Review URL: http://codereview.chromium.org/8973 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4382 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/navigation_controller.cc | 4 ---- 1 file changed, 4 deletions(-) (limited to 'chrome/browser/navigation_controller.cc') diff --git a/chrome/browser/navigation_controller.cc b/chrome/browser/navigation_controller.cc index 77d5269..51beace 100644 --- a/chrome/browser/navigation_controller.cc +++ b/chrome/browser/navigation_controller.cc @@ -491,10 +491,6 @@ NavigationEntry* NavigationController::CreateNavigationEntry( std::wstring(), transition); entry->set_display_url(url); entry->set_user_typed_url(url); - if (url.SchemeIsFile()) { - entry->set_title(file_util::GetFilenameFromPath(UTF8ToWide(url.host() + - url.path()))); - } return entry; } -- cgit v1.1