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

Side by Side Diff: chrome/browser/favicon/fallback_icon_service_factory.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_ 5 #ifndef CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_ 6 #define CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_
7 7
8 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 8 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
9 9
10 namespace base {
10 template <typename T> struct DefaultSingletonTraits; 11 template <typename T> struct DefaultSingletonTraits;
12 }
11 13
12 namespace content { 14 namespace content {
13 class BrowserContext; 15 class BrowserContext;
14 } 16 }
15 17
16 namespace favicon { 18 namespace favicon {
17 class FallbackIconService; 19 class FallbackIconService;
18 } 20 }
19 21
20 // Singleton that owns all FallbackIconService and associates them with 22 // Singleton that owns all FallbackIconService and associates them with
21 // BrowserContext instances. 23 // BrowserContext instances.
22 class FallbackIconServiceFactory : public BrowserContextKeyedServiceFactory { 24 class FallbackIconServiceFactory : public BrowserContextKeyedServiceFactory {
23 public: 25 public:
24 static favicon::FallbackIconService* GetForBrowserContext( 26 static favicon::FallbackIconService* GetForBrowserContext(
25 content::BrowserContext* context); 27 content::BrowserContext* context);
26 28
27 static FallbackIconServiceFactory* GetInstance(); 29 static FallbackIconServiceFactory* GetInstance();
28 30
29 private: 31 private:
30 friend struct DefaultSingletonTraits<FallbackIconServiceFactory>; 32 friend struct base::DefaultSingletonTraits<FallbackIconServiceFactory>;
31 33
32 FallbackIconServiceFactory(); 34 FallbackIconServiceFactory();
33 ~FallbackIconServiceFactory() override; 35 ~FallbackIconServiceFactory() override;
34 36
35 // BrowserContextKeyedServiceFactory: 37 // BrowserContextKeyedServiceFactory:
36 KeyedService* BuildServiceInstanceFor( 38 KeyedService* BuildServiceInstanceFor(
37 content::BrowserContext* context) const override; 39 content::BrowserContext* context) const override;
38 bool ServiceIsNULLWhileTesting() const override; 40 bool ServiceIsNULLWhileTesting() const override;
39 41
40 DISALLOW_COPY_AND_ASSIGN(FallbackIconServiceFactory); 42 DISALLOW_COPY_AND_ASSIGN(FallbackIconServiceFactory);
41 }; 43 };
42 44
43 #endif // CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_ 45 #endif // CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/favicon/chrome_fallback_icon_client_factory.cc ('k') | chrome/browser/favicon/fallback_icon_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698