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

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

Issue 11198007: Clear the favicon of a tab when navigating to a url on a different host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
Index: content/browser/web_contents/navigation_controller_impl.cc
diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc
index 150c5dc77e312a1cc836475b4d7ea88bbed615a2..be570110adcd2978b5444e80b401c07f4ce2eba3 100644
--- a/content/browser/web_contents/navigation_controller_impl.cc
+++ b/content/browser/web_contents/navigation_controller_impl.cc
@@ -1011,12 +1011,18 @@ void NavigationControllerImpl::RendererDidNavigateToExistingPage(
entry_index < static_cast<int>(entries_.size()));
NavigationEntryImpl* entry = entries_[entry_index].get();
- // The URL may have changed due to redirects. The site instance will normally
- // be the same except during session restore, when no site instance will be
- // assigned.
+ // The URL may have changed due to redirects.
entry->SetURL(params.url);
if (entry->update_virtual_url_with_url())
UpdateVirtualURLToURL(entry, params.url);
+
+ // The redirected to page should not inherit the favicon from the previous
+ // page.
+ if (PageTransitionIsRedirect(params.transition))
+ entry->GetFavicon() = content::FaviconStatus();
+
+ // The site instance will normally be the same except during session restore,
+ // when no site instance will be assigned.
DCHECK(entry->site_instance() == NULL ||
entry->site_instance() == web_contents_->GetSiteInstance());
entry->set_site_instance(

Powered by Google App Engine
This is Rietveld 408576698