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

Unified Diff: chrome/browser/favicon/favicon_tab_helper.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: chrome/browser/favicon/favicon_tab_helper.cc
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 6525b0664ab790bab6e94c762c9dfe502ccdd61c..1cdfc421a3bb92563d768392a96a9c1b288ff0ca 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -173,6 +173,12 @@ void FaviconTabHelper::NavigateToPendingEntry(
void FaviconTabHelper::DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) {
+
+ // The NavigationEntry may be reused from the previously navigated page in
+ // the case of a client redirect. Clear the favicon as it should never be
+ // carried over from the previous page.
+ details.entry->GetFavicon() = FaviconStatus();
+
// Get the favicon, either from history or request it from the net.
FetchFavicon(details.entry->GetURL());
}

Powered by Google App Engine
This is Rietveld 408576698