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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 78443005: New Tab: fix tab title flickering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use pending entry. Created 7 years, 1 month 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
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 05c685391a67e294fe153da8b23a69902b0ded00..71d702c6e1c0b00509b8dd50b8e37997ddd13990 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -756,15 +756,13 @@ const string16& WebContentsImpl::GetTitle() const {
// title.
entry = controller_.GetLastCommittedEntry();
- // We make an exception for initial navigations, because we can have a
- // committed entry for an initial navigation when doing a history navigation
- // in a new tab, such as Ctrl+Back.
- if (entry && controller_.IsInitialNavigation())
+ // We make an exception for initial navigations, because there is no committed
Charlie Reis 2013/11/22 01:47:45 This comment isn't correct: there may or may not b
samarth 2013/11/22 17:25:54 Can you suggest a better wording? This code is ver
Charlie Reis 2013/11/22 18:54:18 Sure, but I don't think we've established that thi
+ // entry at this point.
+ if (controller_.IsInitialNavigation())
Charlie Reis 2013/11/22 01:47:45 I don't immediately see a security concern with re
Charlie Reis 2013/11/22 18:54:18 Ok, so GetOverriddenTitle doesn't work. Still, th
samarth 2013/11/22 20:03:19 I tested this by ctrl-clicking on a link for http:
Charlie Reis 2013/11/22 20:33:47 Ok, thanks for trying it out. Let's try checking
samarth 2013/11/22 21:54:41 Done.
entry = controller_.GetVisibleEntry();
- if (entry) {
+ if (entry)
return entry->GetTitleForDisplay(accept_languages);
- }
// |page_title_when_no_navigation_entry_| is finally used
// if no title cannot be retrieved.
« chrome/browser/ui/browser_navigator.cc ('K') | « chrome/browser/ui/browser_navigator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698