summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-23 20:49:07 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-23 20:49:07 +0000
commit3d627bbc21bb7a960cec7db390d0e19c98c65f0e (patch)
treecea7296968cf3f3ddf30e5110441e15cf5ea49e2 /chrome/browser/tab_contents.cc
parent89ce0d09ef9f8c021a9ce441b1ffdf442d203d35 (diff)
downloadchromium_src-3d627bbc21bb7a960cec7db390d0e19c98c65f0e.zip
chromium_src-3d627bbc21bb7a960cec7db390d0e19c98c65f0e.tar.gz
chromium_src-3d627bbc21bb7a960cec7db390d0e19c98c65f0e.tar.bz2
This fixes http://code.google.com/p/chromium/issues/detail?id=2529, which is
tabs displaying Loading/Untitled in Chrome. We should display the page URL if the title of the page is blank. Fix on these lines. R=beng Review URL: http://codereview.chromium.org/7905 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3852 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents.cc')
-rw-r--r--chrome/browser/tab_contents.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/tab_contents.cc b/chrome/browser/tab_contents.cc
index f97c04c..1a80995 100644
--- a/chrome/browser/tab_contents.cc
+++ b/chrome/browser/tab_contents.cc
@@ -131,12 +131,12 @@ const std::wstring& TabContents::GetTitle() const {
// The exception is with transient pages, for which we really want to use
// their title, as they are not committed.
NavigationEntry* entry = controller_->GetTransientEntry();
- if (entry && !entry->title().empty())
- return entry->title();
+ if (entry)
+ return entry->GetTitleForDisplay();
entry = controller_->GetLastCommittedEntry();
if (entry)
- return entry->title();
+ return entry->GetTitleForDisplay();
else if (controller_->LoadingURLLazily())
return controller_->GetLazyTitle();
return EmptyWString();