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

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

Issue 2691933004: Avoid cyclic dependency FaviconHandler<-->FaviconDriverImpl (Closed)
Patch Set: Addressed more comments. 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
« no previous file with comments | « components/favicon/core/favicon_driver.h ('k') | components/favicon/core/favicon_driver_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7d33c3ef936cd5ef71c3cee4a1b2e21f6befe92f 100644
--- a/components/favicon/core/favicon_driver_impl.h
+++ b/components/favicon/core/favicon_driver_impl.h
@@ -10,17 +10,13 @@
#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 +24,6 @@ class HistoryService;
namespace favicon {
-class FaviconHandler;
class FaviconService;
struct FaviconURL;
@@ -39,20 +34,18 @@ struct FaviconURL;
// fetches the given page's icons, requesting them from history backend. If the
// icon is not available or expired, the icon will be downloaded and saved in
// the history backend.
-class FaviconDriverImpl : public FaviconDriver {
+class FaviconDriverImpl : public FaviconDriver,
+ public FaviconHandler::Delegate {
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;
+
+ // FaviconHandler::Delegate implementation.
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,
« no previous file with comments | « components/favicon/core/favicon_driver.h ('k') | components/favicon/core/favicon_driver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698