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 #include "chrome/browser/media/webrtc/webrtc_event_log_manager_keyed_service_factory.h" 6 7 #include "base/check.h" 8 #include "chrome/browser/media/webrtc/webrtc_event_log_manager_keyed_service.h" 9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "content/public/browser/browser_context.h" 11 12 namespace webrtc_event_logging { 13 14 // static 15 WebRtcEventLogManagerKeyedServiceFactory* GetInstance()16WebRtcEventLogManagerKeyedServiceFactory::GetInstance() { 17 return base::Singleton<WebRtcEventLogManagerKeyedServiceFactory>::get(); 18 } 19 20 WebRtcEventLogManagerKeyedServiceFactory:: WebRtcEventLogManagerKeyedServiceFactory()21 WebRtcEventLogManagerKeyedServiceFactory() 22 : BrowserContextKeyedServiceFactory( 23 "WebRtcEventLogManagerKeyedService", 24 BrowserContextDependencyManager::GetInstance()) {} 25 26 WebRtcEventLogManagerKeyedServiceFactory:: 27 ~WebRtcEventLogManagerKeyedServiceFactory() = default; 28 29 bool WebRtcEventLogManagerKeyedServiceFactory:: ServiceIsCreatedWithBrowserContext() const30 ServiceIsCreatedWithBrowserContext() const { 31 return true; 32 } 33 BuildServiceInstanceFor(content::BrowserContext * context) const34KeyedService* WebRtcEventLogManagerKeyedServiceFactory::BuildServiceInstanceFor( 35 content::BrowserContext* context) const { 36 DCHECK(!context->IsOffTheRecord()); 37 return new WebRtcEventLogManagerKeyedService(context); 38 } 39 40 } // namespace webrtc_event_logging 41