OLD | NEW |
| (Empty) |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_TAB_CONTENTS_ORIGINS_SEEN_SERVICE_FACTORY_H_ | |
6 #define CHROME_BROWSER_TAB_CONTENTS_ORIGINS_SEEN_SERVICE_FACTORY_H_ | |
7 | |
8 #include "base/memory/singleton.h" | |
9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | |
10 | |
11 namespace navigation_metrics { | |
12 class OriginsSeenService; | |
13 } | |
14 | |
15 class OriginsSeenServiceFactory : public BrowserContextKeyedServiceFactory { | |
16 public: | |
17 static navigation_metrics::OriginsSeenService* GetForBrowserContext( | |
18 content::BrowserContext* context); | |
19 | |
20 static OriginsSeenServiceFactory* GetInstance(); | |
21 | |
22 // Used to create instances for testing. | |
23 static KeyedService* BuildInstanceFor(content::BrowserContext* context); | |
24 | |
25 private: | |
26 friend struct base::DefaultSingletonTraits<OriginsSeenServiceFactory>; | |
27 | |
28 OriginsSeenServiceFactory(); | |
29 ~OriginsSeenServiceFactory() override; | |
30 | |
31 // BrowserContextKeyedServiceFactory: | |
32 content::BrowserContext* GetBrowserContextToUse( | |
33 content::BrowserContext* context) const override; | |
34 KeyedService* BuildServiceInstanceFor( | |
35 content::BrowserContext* context) const override; | |
36 }; | |
37 | |
38 #endif // CHROME_BROWSER_TAB_CONTENTS_ORIGINS_SEEN_SERVICE_FACTORY_H_ | |
OLD | NEW |