Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / local_discovery / privet_notifications_factory.cc
blob7c3bdf43f7a3c01e118eb7617bbaa7aa5a0cb0b1
1 // Copyright 2013 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.
5 #include "chrome/browser/local_discovery/privet_notifications_factory.h"
7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/local_discovery/privet_notifications.h"
9 #include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
11 namespace local_discovery {
13 PrivetNotificationServiceFactory*
14 PrivetNotificationServiceFactory::GetInstance() {
15 return Singleton<PrivetNotificationServiceFactory>::get();
18 PrivetNotificationServiceFactory::PrivetNotificationServiceFactory()
19 : BrowserContextKeyedServiceFactory(
20 "PrivetNotificationService",
21 BrowserContextDependencyManager::GetInstance()) {
24 PrivetNotificationServiceFactory::~PrivetNotificationServiceFactory() {
27 BrowserContextKeyedService*
28 PrivetNotificationServiceFactory::BuildServiceInstanceFor(
29 content::BrowserContext* profile) const {
30 return new PrivetNotificationService(profile);
33 bool
34 PrivetNotificationServiceFactory::ServiceIsCreatedWithBrowserContext() const {
35 return PrivetNotificationService::IsEnabled();
38 bool PrivetNotificationServiceFactory::ServiceIsNULLWhileTesting() const {
39 return true;
42 } // namespace local_discovery