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

Unified Diff: components/favicon_base/fallback_icon_service.h

Issue 996253002: [Fallback Icons] Refactor FallbackIconService to be a BrowserContext-level singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Making FallbackIconSource take FallbackIconService directly. Created 5 years, 9 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_base/fallback_icon_service.h
diff --git a/components/favicon_base/fallback_icon_service.h b/components/favicon_base/fallback_icon_service.h
index cc98adfe20feb677029bfa6c6cd3b010f38045c3..b737f786e7cc4eeea882d55c5227b44d6f52762d 100644
--- a/components/favicon_base/fallback_icon_service.h
+++ b/components/favicon_base/fallback_icon_service.h
@@ -5,11 +5,12 @@
#ifndef COMPONENTS_FAVICON_BASE_FALLBACK_ICON_SERVICE_H_
#define COMPONENTS_FAVICON_BASE_FALLBACK_ICON_SERVICE_H_
-#include <string>
#include <vector>
#include "base/macros.h"
+#include "components/keyed_service/core/keyed_service.h"
+class FallbackIconClient;
class GURL;
namespace gfx {
@@ -21,9 +22,9 @@ namespace favicon_base {
struct FallbackIconStyle;
// A service to provide methods to render fallback favicons.
-class FallbackIconService {
+class FallbackIconService : public KeyedService {
public:
- explicit FallbackIconService(const std::vector<std::string>& font_list);
+ explicit FallbackIconService(FallbackIconClient* fallback_icon_client);
~FallbackIconService();
// Renders a fallback icon synchronously and returns the bitmap. Returns an
@@ -41,7 +42,7 @@ class FallbackIconService {
const FallbackIconStyle& style,
gfx::Canvas* canvas);
- std::vector<std::string> font_list_;
+ FallbackIconClient* fallback_icon_client_;
DISALLOW_COPY_AND_ASSIGN(FallbackIconService);
};

Powered by Google App Engine
This is Rietveld 408576698