Index: chrome/browser/favicon/fallback_icon_service_factory.h |
diff --git a/chrome/browser/favicon/fallback_icon_service_factory.h b/chrome/browser/favicon/fallback_icon_service_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f90046e76b4c707d5ba05da2d4fd244c4d8c10fd |
--- /dev/null |
+++ b/chrome/browser/favicon/fallback_icon_service_factory.h |
@@ -0,0 +1,41 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_ |
+#define CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_ |
+ |
+#include "components/keyed_service/content/browser_context_keyed_service_factory.h" |
+#include "components/keyed_service/core/service_access_type.h" |
+ |
+template <typename T> struct DefaultSingletonTraits; |
+ |
+class FallbackIconService; |
+class Profile; |
+ |
+// Singleton that owns all FallbackIconService and associates them with |
+// Profiles. |
+class FallbackIconServiceFactory : public BrowserContextKeyedServiceFactory { |
+ public: |
+ // |access| defines what the caller plans to do with the service. See |
+ // the ServiceAccessType definition in profile.h. |
+ static FallbackIconService* GetForProfile( |
+ Profile* profile, ServiceAccessType sat); |
+ |
+ static FallbackIconServiceFactory* GetInstance(); |
+ |
+ private: |
+ friend struct DefaultSingletonTraits<FallbackIconServiceFactory>; |
+ |
+ FallbackIconServiceFactory(); |
+ ~FallbackIconServiceFactory() override; |
+ |
+ // BrowserContextKeyedServiceFactory: |
+ KeyedService* BuildServiceInstanceFor( |
+ content::BrowserContext* profile) const override; |
+ bool ServiceIsNULLWhileTesting() const override; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(FallbackIconServiceFactory); |
+}; |
+ |
+#endif // CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_ |