| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_HISTORY_CHROME_HISTORY_CLIENT_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_NET_CERT_DATABASE_SERVICE_FACTORY_H_ |
| 6 #define CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_FACTORY_H_ | 6 #define CHROME_BROWSER_NET_CERT_DATABASE_SERVICE_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 8 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 9 | 10 |
| 10 template <typename T> | 11 template <typename T> |
| 11 struct DefaultSingletonTraits; | 12 struct DefaultSingletonTraits; |
| 12 | 13 |
| 13 class ChromeHistoryClient; | 14 class CertDatabaseService; |
| 15 class CertDatabaseServiceIOPart; |
| 14 class Profile; | 16 class Profile; |
| 15 | 17 |
| 16 // Singleton that owns all ChromeHistoryClients and associates them with | 18 class CertDatabaseServiceFactory : public BrowserContextKeyedServiceFactory { |
| 17 // Profiles. | |
| 18 class ChromeHistoryClientFactory : public BrowserContextKeyedServiceFactory { | |
| 19 public: | 19 public: |
| 20 static ChromeHistoryClient* GetForProfile(Profile* profile); | 20 static CertDatabaseService* GetForBrowserContext( |
| 21 content::BrowserContext* context); |
| 21 | 22 |
| 22 static ChromeHistoryClientFactory* GetInstance(); | 23 static CertDatabaseServiceFactory* GetInstance(); |
| 23 | 24 |
| 24 private: | 25 private: |
| 25 friend struct DefaultSingletonTraits<ChromeHistoryClientFactory>; | 26 friend struct DefaultSingletonTraits<CertDatabaseServiceFactory>; |
| 26 | 27 |
| 27 ChromeHistoryClientFactory(); | 28 CertDatabaseServiceFactory(); |
| 28 virtual ~ChromeHistoryClientFactory(); | 29 virtual ~CertDatabaseServiceFactory(); |
| 29 | 30 |
| 30 // BrowserContextKeyedServiceFactory: | 31 // BrowserContextKeyedServiceFactory: |
| 32 virtual content::BrowserContext* GetBrowserContextToUse( |
| 33 content::BrowserContext* context) const OVERRIDE; |
| 34 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; |
| 31 virtual KeyedService* BuildServiceInstanceFor( | 35 virtual KeyedService* BuildServiceInstanceFor( |
| 32 content::BrowserContext* context) const OVERRIDE; | 36 content::BrowserContext* context) const OVERRIDE; |
| 33 virtual content::BrowserContext* GetBrowserContextToUse( | 37 |
| 34 content::BrowserContext* context) const OVERRIDE; | 38 DISALLOW_COPY_AND_ASSIGN(CertDatabaseServiceFactory); |
| 35 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; | |
| 36 }; | 39 }; |
| 37 | 40 |
| 38 #endif // CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_FACTORY_H_ | 41 #endif // CHROME_BROWSER_NET_CERT_DATABASE_SERVICE_FACTORY_H_ |
| OLD | NEW |