From 72de4d975e886d4ce0337b28e8613c5d27c53d6f Mon Sep 17 00:00:00 2001 From: pkotwicz Date: Tue, 13 Oct 2015 12:16:36 -0700 Subject: [PATCH] Stop FaviconHandler from querying GetActiveFaviconValidity() part 1/2 The combination of: - The existence of |FaviconHandler::history_results_| - The checking against duplicate calls to FaviconHandler::OnUpdateFaviconURL() introduced in https://codereview.chromium.org/1295733002 makes the GetActiveFaviconValidity() / GetActiveFaviconURL() check in FaviconHandler::ProcessCurrentUrl() unnecessary BUG=517089 Review URL: https://codereview.chromium.org/1396133003 Cr-Commit-Position: refs/heads/master@{#353817} --- components/favicon/core/favicon_handler.cc | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/components/favicon/core/favicon_handler.cc b/components/favicon/core/favicon_handler.cc index aea23c5e741508..d8ec1eaa58ad19 100644 --- a/components/favicon/core/favicon_handler.cc +++ b/components/favicon/core/favicon_handler.cc @@ -384,17 +384,9 @@ void FaviconHandler::OnUpdateFaviconURL( void FaviconHandler::ProcessCurrentUrl() { DCHECK(!image_urls_.empty()); - if (current_candidate()->icon_type == favicon_base::FAVICON && - !download_largest_icon_) { - if (!favicon_expired_or_incomplete_ && - driver_->GetActiveFaviconValidity() && - DoUrlAndIconMatch(*current_candidate(), - driver_->GetActiveFaviconURL(), - favicon_base::FAVICON)) - return; - } else if (!favicon_expired_or_incomplete_ && got_favicon_from_history_ && - HasValidResult(history_results_) && - DoUrlsAndIconsMatch(*current_candidate(), history_results_)) { + if (!favicon_expired_or_incomplete_ && got_favicon_from_history_ && + HasValidResult(history_results_) && + DoUrlsAndIconsMatch(*current_candidate(), history_results_)) { return; }