Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Unified Diff: components/favicon/core/favicon_driver_impl.h

Issue 2691933004: Avoid cyclic dependency FaviconHandler<-->FaviconDriverImpl (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/favicon/core/favicon_driver_impl.h
diff --git a/components/favicon/core/favicon_driver_impl.h b/components/favicon/core/favicon_driver_impl.h
index 12fbd9494d99e40f041f150ff8186349d0602ca1..09b47d3ea87119401c999e0a29e07c9d387c765b 100644
--- a/components/favicon/core/favicon_driver_impl.h
+++ b/components/favicon/core/favicon_driver_impl.h
@@ -10,17 +10,9 @@
#include "base/macros.h"
#include "components/favicon/core/favicon_driver.h"
+#include "components/favicon/core/favicon_handler.h"
class GURL;
-class SkBitmap;
-
-namespace bookmarks {
-class BookmarkModel;
-}
-
-namespace gfx {
-class Size;
-}
namespace history {
class HistoryService;
@@ -28,7 +20,6 @@ class HistoryService;
namespace favicon {
-class FaviconHandler;
class FaviconService;
struct FaviconURL;
@@ -41,23 +32,17 @@ struct FaviconURL;
// the history backend.
class FaviconDriverImpl : public FaviconDriver {
public:
- // Favicon download callback.
- // Public for testing.
- void DidDownloadFavicon(int id,
- int http_status_code,
- const GURL& image_url,
- const std::vector<SkBitmap>& bitmaps,
- const std::vector<gfx::Size>& original_bitmap_sizes);
-
// FaviconDriver implementation.
void FetchFavicon(const GURL& url) override;
- bool IsBookmarked(const GURL& url) override;
- bool HasPendingTasksForTest() override;
+
+ // Returns whether the driver is waiting for a download to complete or for
+ // data from the FaviconService. Reserved for testing.
+ bool HasPendingTasksForTest();
protected:
FaviconDriverImpl(FaviconService* favicon_service,
history::HistoryService* history_service,
- bookmarks::BookmarkModel* bookmark_model);
+ FaviconHandler::Delegate* delegate);
~FaviconDriverImpl() override;
// Returns whether downloading favicon for |url| previously failed.
@@ -82,7 +67,6 @@ class FaviconDriverImpl : public FaviconDriver {
// but if they are defined, they must outlive the FaviconDriverImpl.
FaviconService* favicon_service_;
history::HistoryService* history_service_;
- bookmarks::BookmarkModel* bookmark_model_;
// FaviconHandlers used to download the different kind of favicons.
// |touch_icon_handler_| may be null depending on the platform and variations.

Powered by Google App Engine
This is Rietveld 408576698