Chromium Code Reviews| 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..4ff19390e2d793c665278cb5c6aba2c5224f2f84 100644 |
| --- a/chrome/browser/favicon/favicon_tab_helper.cc |
| +++ b/chrome/browser/favicon/favicon_tab_helper.cc |
| @@ -23,6 +23,7 @@ |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/browser/web_contents_delegate.h" |
| #include "content/public/browser/web_ui.h" |
| +#include "content/public/common/frame_navigate_params.h" |
| #include "ui/gfx/codec/png_codec.h" |
| #include "ui/gfx/image/image.h" |
| #include "ui/gfx/image/image_skia.h" |
| @@ -173,6 +174,15 @@ 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 |
|
sky
2012/10/17 16:07:34
Is the real bug that we're reusing favicons on cli
|
| + // the case of a client redirect. Clear the favicon as it should never be |
| + // carried over from the previous page. Do not clear the favicon in the case |
| + // of back and forward transitions to avoid negative interaction with the |
| + // BackForwardMenuModel. |
| + if ((params.transition & content::PAGE_TRANSITION_FORWARD_BACK) == 0) |
| + details.entry->GetFavicon() = FaviconStatus(); |
| + |
| // Get the favicon, either from history or request it from the net. |
| FetchFavicon(details.entry->GetURL()); |
| } |