Update mojo surfaces bindings and mojo/cc/ glue
[chromium-blink-merge.git] / chrome / browser / notifications / sync_notifier / chrome_notifier_service_factory.cc
bloba31f1ed9472c38a9954a0580662fe5c0c24b2ad2
1 // Copyright (c) 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/notifications/sync_notifier/chrome_notifier_service_factory.h"
7 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 namespace notifier {
12 // static
13 ChromeNotifierService* ChromeNotifierServiceFactory::GetForProfile(
14 Profile* profile, Profile::ServiceAccessType service_access_type) {
15 return static_cast<ChromeNotifierService*>(
16 GetInstance()->GetServiceForBrowserContext(profile, true));
19 // static
20 ChromeNotifierServiceFactory* ChromeNotifierServiceFactory::GetInstance() {
21 return Singleton<ChromeNotifierServiceFactory>::get();
25 ChromeNotifierServiceFactory::ChromeNotifierServiceFactory()
26 : BrowserContextKeyedServiceFactory(
27 "ChromeNotifierService",
28 BrowserContextDependencyManager::GetInstance()) {
31 ChromeNotifierServiceFactory::~ChromeNotifierServiceFactory() {
34 KeyedService* ChromeNotifierServiceFactory::BuildServiceInstanceFor(
35 content::BrowserContext* profile) const {
36 ChromeNotifierService* chrome_notifier_service =
37 new ChromeNotifierService(static_cast<Profile*>(profile));
38 return chrome_notifier_service;
41 } // namespace notifier