| Index: chrome/browser/navigation_entry.cc
|
| ===================================================================
|
| --- chrome/browser/navigation_entry.cc (revision 4245)
|
| +++ chrome/browser/navigation_entry.cc (working copy)
|
| @@ -5,6 +5,7 @@
|
| #include "chrome/browser/navigation_entry.h"
|
|
|
| #include "chrome/common/resource_bundle.h"
|
| +#include "net/base/escape.h"
|
|
|
| // Use this to get a new unique ID for a NavigationEntry during construction.
|
| // The returned ID is guaranteed to be nonzero (which is the "no ID" indicator).
|
| @@ -58,7 +59,11 @@
|
| }
|
|
|
| const std::wstring& NavigationEntry::GetTitleForDisplay() {
|
| - if (title_.empty())
|
| - return url_as_string_;
|
| + if (title_.empty()) {
|
| + title_ = UTF8ToWide(url_.ExtractFileName().empty() ?
|
| + url_.spec() :
|
| + UnescapeURLComponent(url_.ExtractFileName(),
|
| + UnescapeRule::SPACES | UnescapeRule::URL_SPECIAL_CHARS));
|
| + }
|
| return title_;
|
| }
|
|
|