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

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
« no previous file with comments | « AUTHORS ('k') | content/browser/web_contents/navigation_controller_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 649d40699b84d84dab34d26bdd4f6e4238a71c4a..9dba8af8f2e7c4f7fc9a5317cf3a5184e34b2f40 100644
--- a/content/browser/web_contents/navigation_controller_impl.cc
+++ b/content/browser/web_contents/navigation_controller_impl.cc
@@ -993,12 +993,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(
« no previous file with comments | « AUTHORS ('k') | content/browser/web_contents/navigation_controller_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698