| 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 2aecafd35a1afc42dd4fdb252f426db2eec242dc..de732009867a0a2d933cb9ac220bfc5b7aca221a 100644
|
| --- a/components/favicon/core/favicon_driver_impl.cc
|
| +++ b/components/favicon/core/favicon_driver_impl.cc
|
| @@ -7,7 +7,6 @@
|
| #include "base/logging.h"
|
| #include "base/strings/string_util.h"
|
| #include "build/build_config.h"
|
| -#include "components/bookmarks/browser/bookmark_model.h"
|
| #include "components/favicon/core/favicon_driver_observer.h"
|
| #include "components/favicon/core/favicon_handler.h"
|
| #include "components/favicon/core/favicon_service.h"
|
| @@ -26,17 +25,15 @@ const bool kEnableTouchIcon = false;
|
|
|
| FaviconDriverImpl::FaviconDriverImpl(FaviconService* favicon_service,
|
| history::HistoryService* history_service,
|
| - bookmarks::BookmarkModel* bookmark_model)
|
| - : favicon_service_(favicon_service),
|
| - history_service_(history_service),
|
| - bookmark_model_(bookmark_model) {
|
| + FaviconHandler::Delegate* delegate)
|
| + : favicon_service_(favicon_service), history_service_(history_service) {
|
| favicon_handler_.reset(new FaviconHandler(
|
| - favicon_service_, this, kEnableTouchIcon
|
| - ? FaviconDriverObserver::NON_TOUCH_LARGEST
|
| - : FaviconDriverObserver::NON_TOUCH_16_DIP));
|
| + favicon_service_, delegate,
|
| + 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_, delegate, FaviconDriverObserver::TOUCH_LARGEST));
|
| }
|
| }
|
|
|
| @@ -49,30 +46,6 @@ void FaviconDriverImpl::FetchFavicon(const GURL& url) {
|
| touch_icon_handler_->FetchFavicon(url);
|
| }
|
|
|
| -void FaviconDriverImpl::DidDownloadFavicon(
|
| - int id,
|
| - int http_status_code,
|
| - const GURL& image_url,
|
| - const std::vector<SkBitmap>& bitmaps,
|
| - const std::vector<gfx::Size>& original_bitmap_sizes) {
|
| - if (bitmaps.empty() && http_status_code == 404) {
|
| - DVLOG(1) << "Failed to Download Favicon:" << image_url;
|
| - if (favicon_service_)
|
| - favicon_service_->UnableToDownloadFavicon(image_url);
|
| - }
|
| -
|
| - favicon_handler_->OnDidDownloadFavicon(id, image_url, bitmaps,
|
| - original_bitmap_sizes);
|
| - if (touch_icon_handler_.get()) {
|
| - touch_icon_handler_->OnDidDownloadFavicon(id, image_url, bitmaps,
|
| - original_bitmap_sizes);
|
| - }
|
| -}
|
| -
|
| -bool FaviconDriverImpl::IsBookmarked(const GURL& url) {
|
| - return bookmark_model_ && bookmark_model_->IsBookmarked(url);
|
| -}
|
| -
|
| bool FaviconDriverImpl::HasPendingTasksForTest() {
|
| if (favicon_handler_->HasPendingTasksForTest())
|
| return true;
|
|
|