OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_HISTORY_SERVICE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_FACTORY_H_ |
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_FACTORY_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
10 #include "components/keyed_service/core/service_access_type.h" | 10 #include "components/keyed_service/core/service_access_type.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 static HistoryServiceFactory* GetInstance(); | 31 static HistoryServiceFactory* GetInstance(); |
32 | 32 |
33 // In the testing profile, we often clear the history before making a new | 33 // In the testing profile, we often clear the history before making a new |
34 // one. This takes care of that work. It should only be used in tests. | 34 // one. This takes care of that work. It should only be used in tests. |
35 // Note: This does not do any cleanup; it only destroys the service. The | 35 // Note: This does not do any cleanup; it only destroys the service. The |
36 // calling test is expected to do the cleanup before calling this function. | 36 // calling test is expected to do the cleanup before calling this function. |
37 static void ShutdownForProfile(Profile* profile); | 37 static void ShutdownForProfile(Profile* profile); |
38 | 38 |
39 private: | 39 private: |
40 friend struct DefaultSingletonTraits<HistoryServiceFactory>; | 40 friend struct base::DefaultSingletonTraits<HistoryServiceFactory>; |
41 | 41 |
42 HistoryServiceFactory(); | 42 HistoryServiceFactory(); |
43 ~HistoryServiceFactory() override; | 43 ~HistoryServiceFactory() override; |
44 | 44 |
45 // BrowserContextKeyedServiceFactory: | 45 // BrowserContextKeyedServiceFactory: |
46 KeyedService* BuildServiceInstanceFor( | 46 KeyedService* BuildServiceInstanceFor( |
47 content::BrowserContext* context) const override; | 47 content::BrowserContext* context) const override; |
48 content::BrowserContext* GetBrowserContextToUse( | 48 content::BrowserContext* GetBrowserContextToUse( |
49 content::BrowserContext* context) const override; | 49 content::BrowserContext* context) const override; |
50 bool ServiceIsNULLWhileTesting() const override; | 50 bool ServiceIsNULLWhileTesting() const override; |
51 }; | 51 }; |
52 | 52 |
53 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_FACTORY_H_ | 53 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_FACTORY_H_ |
OLD | NEW |