Index: components/favicon/ios/web_favicon_driver.cc |
diff --git a/components/favicon/ios/web_favicon_driver.cc b/components/favicon/ios/web_favicon_driver.cc |
index cadd60f6222330eb1690b20370fbb74a242c28eb..b1a8e11a635c0ab8110aaff18fcff38edf412775 100644 |
--- a/components/favicon/ios/web_favicon_driver.cc |
+++ b/components/favicon/ios/web_favicon_driver.cc |
@@ -72,16 +72,12 @@ GURL WebFaviconDriver::GetActiveURL() { |
return item ? item->GetURL() : GURL(); |
} |
-bool WebFaviconDriver::GetActiveFaviconValidity() { |
- return !ActiveURLChangedSinceFetchFavicon() && GetFaviconStatus().valid; |
-} |
- |
void WebFaviconDriver::SetActiveFaviconValidity(bool validity) { |
GetFaviconStatus().valid = validity; |
} |
GURL WebFaviconDriver::GetActiveFaviconURL() { |
- return ActiveURLChangedSinceFetchFavicon() ? GURL() : GetFaviconStatus().url; |
+ return GetFaviconStatus().url; |
} |
void WebFaviconDriver::SetActiveFaviconURL(const GURL& url) { |
@@ -92,17 +88,8 @@ void WebFaviconDriver::SetActiveFaviconImage(const gfx::Image& image) { |
GetFaviconStatus().image = image; |
} |
-bool WebFaviconDriver::ActiveURLChangedSinceFetchFavicon() { |
- // On iOS the active URL can change in between calls to FetchFavicon(). For |
- // instance, FetchFavicon() is not synchronously called when the active URL |
- // changes as a result of CRWSessionController::goToEntry(). |
- // TODO(stuartmorgan): Remove this once iOS always triggers favicon fetches |
- // synchronously after active URL changes. |
- return GetActiveURL() != fetch_favicon_url_; |
-} |
- |
web::FaviconStatus& WebFaviconDriver::GetFaviconStatus() { |
- DCHECK(!ActiveURLChangedSinceFetchFavicon()); |
+ DCHECK(web_state()->GetNavigationManager()->GetVisibleItem()); |
return web_state()->GetNavigationManager()->GetVisibleItem()->GetFavicon(); |
} |