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

Unified Diff: chrome/browser/favicon/large_icon_service_factory.h

Issue 1092873002: [Icons NTP] Refactor large_icon_source to extract the logic shared between desktop and Android to f… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/favicon/large_icon_service_factory.h
diff --git a/chrome/browser/favicon/large_icon_service_factory.h b/chrome/browser/favicon/large_icon_service_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..46a9e5bb6f4756c7be0ca917b92eca1f58cf3702
--- /dev/null
+++ b/chrome/browser/favicon/large_icon_service_factory.h
@@ -0,0 +1,43 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
huangs 2015/04/20 19:50:25 I presume this file was branched from a sibling fi
beaudoin 2015/04/21 00:15:38 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_FAVICON_LARGE_ICON_SERVICE_FACTORY_H_
+#define CHROME_BROWSER_FAVICON_LARGE_ICON_SERVICE_FACTORY_H_
+
+#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
+
+template <typename T> struct DefaultSingletonTraits;
+
+namespace content {
+class BrowserContext;
+}
+
+namespace favicon {
+class LargeIconService;
+}
+
+// Singleton that owns all LargeIconService and associates them with
+// BrowserContext instances.
+class LargeIconServiceFactory : public BrowserContextKeyedServiceFactory {
+ public:
+ static favicon::LargeIconService* GetForBrowserContext(
+ content::BrowserContext* context);
+
+ static LargeIconServiceFactory* GetInstance();
+
+ private:
+ friend struct DefaultSingletonTraits<LargeIconServiceFactory>;
+
+ LargeIconServiceFactory();
+ ~LargeIconServiceFactory() override;
+
+ // BrowserContextKeyedServiceFactory:
+ KeyedService* BuildServiceInstanceFor(
+ content::BrowserContext* context) const override;
+ bool ServiceIsNULLWhileTesting() const override;
+
+ DISALLOW_COPY_AND_ASSIGN(LargeIconServiceFactory);
+};
+
+#endif // CHROME_BROWSER_FAVICON_LARGE_ICON_SERVICE_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698