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

Unified Diff: chrome/browser/ui/webui/large_icon_source.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: Sync and merge. 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: chrome/browser/ui/webui/large_icon_source.h
diff --git a/chrome/browser/ui/webui/large_icon_source.h b/chrome/browser/ui/webui/large_icon_source.h
index df3fad628c2c963ece2203b8ac05a758395bc617..2327670a02670f5ff2c3283443dadf450e5316dc 100644
--- a/chrome/browser/ui/webui/large_icon_source.h
+++ b/chrome/browser/ui/webui/large_icon_source.h
@@ -5,13 +5,16 @@
#ifndef CHROME_BROWSER_UI_WEBUI_LARGE_ICON_SOURCE_H_
#define CHROME_BROWSER_UI_WEBUI_LARGE_ICON_SOURCE_H_
+#include <string>
+
#include "base/memory/scoped_ptr.h"
#include "base/task/cancelable_task_tracker.h"
#include "components/favicon/core/fallback_icon_service.h"
#include "components/favicon_base/favicon_types.h"
#include "content/public/browser/url_data_source.h"
-class Profile;
+class FallbackIconService;
+class FaviconService;
// LargeIconSource services explicit chrome:// requests for large icons.
//
@@ -28,7 +31,9 @@ class Profile;
// This requests a 48x48 large icon for http://www.google.com.
class LargeIconSource : public content::URLDataSource {
public:
- explicit LargeIconSource(Profile* profile);
+ // |favicon_service| and |fallback_icon_service| are owned by caller.
+ LargeIconSource(FaviconService* favicon_service,
+ FallbackIconService* fallback_icon_service);
~LargeIconSource() override;
@@ -69,11 +74,11 @@ class LargeIconSource : public content::URLDataSource {
void SendNotFoundResponse(
const content::URLDataSource::GotDataCallback& callback);
- Profile* profile_;
-
base::CancelableTaskTracker cancelable_task_tracker_;
- scoped_ptr<FallbackIconService> fallback_icon_service_;
+ FaviconService* favicon_service_;
+
+ FallbackIconService* fallback_icon_service_;
DISALLOW_COPY_AND_ASSIGN(LargeIconSource);
};

Powered by Google App Engine
This is Rietveld 408576698