| 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 c95bf3aae13dbed1276ab194ae3fbd211d910235..4ef08e228d805d0b6a4a3c5cb9f7c4aa4ac686f9 100644
|
| --- a/components/favicon/core/favicon_driver_impl.cc
|
| +++ b/components/favicon/core/favicon_driver_impl.cc
|
| @@ -47,16 +47,13 @@ FaviconDriverImpl::FaviconDriverImpl(FaviconService* favicon_service,
|
| : favicon_service_(favicon_service),
|
| history_service_(history_service),
|
| bookmark_model_(bookmark_model) {
|
| + bool download_large_icons = kEnableTouchIcon || IsIconNTPEnabled();
|
| favicon_handler_.reset(new FaviconHandler(
|
| - favicon_service_, this, FaviconHandler::FAVICON, kEnableTouchIcon));
|
| - if (kEnableTouchIcon) {
|
| + favicon_service_, this, FaviconHandler::FAVICON, download_large_icons));
|
| + if (download_large_icons) {
|
| touch_icon_handler_.reset(new FaviconHandler(favicon_service_, this,
|
| FaviconHandler::TOUCH, true));
|
| }
|
| - if (IsIconNTPEnabled()) {
|
| - large_icon_handler_.reset(new FaviconHandler(favicon_service_, this,
|
| - FaviconHandler::LARGE, true));
|
| - }
|
| }
|
|
|
| FaviconDriverImpl::~FaviconDriverImpl() {
|
| @@ -66,8 +63,6 @@ void FaviconDriverImpl::FetchFavicon(const GURL& url) {
|
| favicon_handler_->FetchFavicon(url);
|
| if (touch_icon_handler_.get())
|
| touch_icon_handler_->FetchFavicon(url);
|
| - if (large_icon_handler_.get())
|
| - large_icon_handler_->FetchFavicon(url);
|
| }
|
|
|
| void FaviconDriverImpl::SaveFavicon() {
|
| @@ -113,10 +108,6 @@ void FaviconDriverImpl::DidDownloadFavicon(
|
| touch_icon_handler_->OnDidDownloadFavicon(id, image_url, bitmaps,
|
| original_bitmap_sizes);
|
| }
|
| - if (large_icon_handler_.get()) {
|
| - large_icon_handler_->OnDidDownloadFavicon(id, image_url, bitmaps,
|
| - original_bitmap_sizes);
|
| - }
|
| }
|
|
|
| bool FaviconDriverImpl::IsBookmarked(const GURL& url) {
|
| @@ -147,8 +138,6 @@ bool FaviconDriverImpl::HasPendingTasksForTest() {
|
| return true;
|
| if (touch_icon_handler_ && touch_icon_handler_->HasPendingTasksForTest())
|
| return true;
|
| - if (large_icon_handler_ && large_icon_handler_->HasPendingTasksForTest())
|
| - return true;
|
| return false;
|
| }
|
|
|
| @@ -171,8 +160,6 @@ void FaviconDriverImpl::OnUpdateFaviconURL(
|
| favicon_handler_->OnUpdateFaviconURL(candidates);
|
| if (touch_icon_handler_.get())
|
| touch_icon_handler_->OnUpdateFaviconURL(candidates);
|
| - if (large_icon_handler_.get())
|
| - large_icon_handler_->OnUpdateFaviconURL(candidates);
|
| }
|
|
|
| } // namespace favicon
|
|
|