| Index: ios/chrome/browser/tabs/tab.mm
|
| diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
|
| index e8e4d245ae79eb7ce67ed26d4ce2e50fc2850ba7..8fafe5251deba41b0e1887231bc633ddc42501ff 100644
|
| --- a/ios/chrome/browser/tabs/tab.mm
|
| +++ b/ios/chrome/browser/tabs/tab.mm
|
| @@ -136,6 +136,7 @@
|
| #include "ios/web/public/url_util.h"
|
| #include "ios/web/public/web_client.h"
|
| #import "ios/web/public/web_state/js/crw_js_injection_receiver.h"
|
| +#include "ios/web/public/web_state/navigation_context.h"
|
| #import "ios/web/public/web_state/ui/crw_generic_content_view.h"
|
| #include "ios/web/public/web_state/web_state.h"
|
| #import "ios/web/public/web_state/web_state_observer_bridge.h"
|
| @@ -1364,12 +1365,14 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
|
| [parentTabModel_ notifyTabChanged:self];
|
| }
|
|
|
| -- (void)webDidUpdateHistoryStateWithPageURL:(const GURL&)pageUrl {
|
| - favicon::FaviconDriver* faviconDriver =
|
| - favicon::WebFaviconDriver::FromWebState(self.webState);
|
| - if (faviconDriver) {
|
| - // Fetch the favicon for the new URL.
|
| - faviconDriver->FetchFavicon(pageUrl);
|
| +- (void)webState:(web::WebState*)webState
|
| + didFinishNavigation:(web::NavigationContext*)navigation {
|
| + if (navigation->IsSamePage()) {
|
| + auto faviconDriver = favicon::WebFaviconDriver::FromWebState(webState);
|
| + if (faviconDriver) {
|
| + // Fetch the favicon for the new URL.
|
| + faviconDriver->FetchFavicon(navigation->GetUrl());
|
| + }
|
| }
|
| [parentTabModel_ notifyTabChanged:self];
|
| }
|
|
|