1 // Copyright 2018 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_MEDIA_WEBRTC_WEBRTC_EVENT_LOG_MANAGER_KEYED_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_EVENT_LOG_MANAGER_KEYED_SERVICE_FACTORY_H_
7 
8 #include "base/macros.h"
9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
11 
12 class KeyedService;
13 
14 namespace content {
15 class BrowserContext;
16 }  // namespace content
17 
18 namespace webrtc_event_logging {
19 
20 // Produces WebRtcEventLogManagerKeyedService-s for non-incognito profiles.
21 class WebRtcEventLogManagerKeyedServiceFactory
22     : public BrowserContextKeyedServiceFactory {
23  public:
24   static WebRtcEventLogManagerKeyedServiceFactory* GetInstance();
25 
26  protected:
27   bool ServiceIsCreatedWithBrowserContext() const override;
28 
29  private:
30   friend struct base::DefaultSingletonTraits<
31       WebRtcEventLogManagerKeyedServiceFactory>;
32 
33   WebRtcEventLogManagerKeyedServiceFactory();
34   ~WebRtcEventLogManagerKeyedServiceFactory() override;
35 
36   KeyedService* BuildServiceInstanceFor(
37       content::BrowserContext* context) const override;
38 
39   DISALLOW_COPY_AND_ASSIGN(WebRtcEventLogManagerKeyedServiceFactory);
40 };
41 
42 }  // namespace webrtc_event_logging
43 
44 #endif  // CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_EVENT_LOG_MANAGER_KEYED_SERVICE_FACTORY_H_
45