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

Unified Diff: components/favicon/ios/web_favicon_driver.cc

Issue 1399913002: Stop FaviconHandler from querying GetActiveFaviconValidity() part 2/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@favicon_remove_validity_check
Patch Set: Created 5 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
« no previous file with comments | « components/favicon/ios/web_favicon_driver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « components/favicon/ios/web_favicon_driver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698