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 COMPONENTS_REPORTING_CONTENT_BROWSER_REPORTING_SERVICE_FACTORY_H_ |
| 6 #define COMPONENTS_REPORTING_CONTENT_BROWSER_REPORTING_SERVICE_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/singleton.h" |
| 10 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 11 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 12 #include "components/reporting/core/common/reporting_export.h" |
| 13 |
| 14 namespace reporting { |
| 15 |
| 16 class ReportingService; |
| 17 |
| 18 class REPORTING_EXPORT ReportingServiceFactory |
| 19 : public BrowserContextKeyedServiceFactory { |
| 20 public: |
| 21 static ReportingService* GetForBrowserContext( |
| 22 content::BrowserContext* context, |
| 23 bool create); |
| 24 |
| 25 static ReportingServiceFactory* GetInstance(); |
| 26 |
| 27 private: |
| 28 friend struct base::DefaultSingletonTraits<ReportingServiceFactory>; |
| 29 |
| 30 ReportingServiceFactory(); |
| 31 ~ReportingServiceFactory() override; |
| 32 |
| 33 // BrowserContextKeyedServiceFactory: |
| 34 KeyedService* BuildServiceInstanceFor( |
| 35 content::BrowserContext* context) const override; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(ReportingServiceFactory); |
| 38 }; |
| 39 |
| 40 } // namespace reporting |
| 41 |
| 42 #endif // COMPONENTS_REPORTING_CONTENT_BROWSER_REPORTING_SERVICE_FACTORY_H_ |
OLD | NEW |