Skip to content

Commit

Permalink
Stop FaviconHandler from querying GetActiveFaviconValidity() part 1/2
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
pkotwicz authored and Commit bot committed Oct 13, 2015
1 parent 7202ca4 commit 72de4d9
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions components/favicon/core/favicon_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 72de4d9

Please sign in to comment.