Index: components/favicon/core/favicon_driver_impl.cc |
diff --git a/components/favicon/core/favicon_driver_impl.cc b/components/favicon/core/favicon_driver_impl.cc |
index 61e5b084c4b114c1ca818a8ce070e436cc09ede0..284977fa630943a145fedbf6375ff1f348820eaa 100644 |
--- a/components/favicon/core/favicon_driver_impl.cc |
+++ b/components/favicon/core/favicon_driver_impl.cc |
@@ -19,9 +19,9 @@ namespace favicon { |
namespace { |
#if defined(OS_ANDROID) || defined(OS_IOS) |
-const bool kEnableTouchIcon = true; |
+const bool kFetchLargestIcon = true; |
#else |
-const bool kEnableTouchIcon = false; |
+const bool kFetchLargestIcon = false; |
#endif |
void RecordCandidateMetrics(const std::vector<FaviconURL>& candidates) { |
@@ -53,13 +53,9 @@ FaviconDriverImpl::FaviconDriverImpl(FaviconService* favicon_service, |
history_service_(history_service), |
bookmark_model_(bookmark_model) { |
favicon_handler_.reset(new FaviconHandler( |
- favicon_service_, this, kEnableTouchIcon |
- ? FaviconDriverObserver::NON_TOUCH_LARGEST |
- : FaviconDriverObserver::NON_TOUCH_16_DIP)); |
- if (kEnableTouchIcon) { |
- touch_icon_handler_.reset(new FaviconHandler( |
- favicon_service_, this, FaviconDriverObserver::TOUCH_LARGEST)); |
- } |
+ favicon_service_, this, |
+ kFetchLargestIcon ? FaviconDriverObserver::LARGEST |
+ : FaviconDriverObserver::NON_TOUCH_16_DIP)); |
} |
FaviconDriverImpl::~FaviconDriverImpl() { |
@@ -67,8 +63,6 @@ FaviconDriverImpl::~FaviconDriverImpl() { |
void FaviconDriverImpl::FetchFavicon(const GURL& url) { |
favicon_handler_->FetchFavicon(url); |
- if (touch_icon_handler_.get()) |
- touch_icon_handler_->FetchFavicon(url); |
} |
bool FaviconDriverImpl::IsBookmarked(const GURL& url) { |
@@ -76,11 +70,7 @@ bool FaviconDriverImpl::IsBookmarked(const GURL& url) { |
} |
bool FaviconDriverImpl::HasPendingTasksForTest() { |
- if (favicon_handler_->HasPendingTasksForTest()) |
- return true; |
- if (touch_icon_handler_ && touch_icon_handler_->HasPendingTasksForTest()) |
- return true; |
- return false; |
+ return favicon_handler_->HasPendingTasksForTest(); |
} |
void FaviconDriverImpl::SetFaviconOutOfDateForPage(const GURL& url, |
@@ -98,8 +88,6 @@ void FaviconDriverImpl::OnUpdateFaviconURL( |
DCHECK(!candidates.empty()); |
RecordCandidateMetrics(candidates); |
favicon_handler_->OnUpdateFaviconURL(page_url, candidates); |
- if (touch_icon_handler_.get()) |
- touch_icon_handler_->OnUpdateFaviconURL(page_url, candidates); |
} |
} // namespace favicon |