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

Unified Diff: chrome/browser/favicon/favicon_tab_helper.cc

Issue 10886059: Clear the favicon of a tab when navigating to a url on a different host. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/favicon/favicon_tab_helper.cc
===================================================================
--- chrome/browser/favicon/favicon_tab_helper.cc (revision 153636)
+++ chrome/browser/favicon/favicon_tab_helper.cc (working copy)
@@ -176,6 +176,13 @@
void FaviconTabHelper::DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) {
+
+ // When navigating to a different host, clear the favicon.
+ if (details.previous_url.host() != details.entry->GetURL().host()) {
pkotwicz 2012/09/29 23:54:38 The favicon should actually always be cleared. (Yo
+ FaviconStatus default_favicon;
+ details.entry->GetFavicon() = default_favicon;
msw 2012/09/21 21:46:54 nit: I think you can just do details.entry->GetFav
+ }
+
// Get the favicon, either from history or request it from the net.
FetchFavicon(details.entry->GetURL());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698