Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: chrome/browser/notifier/chrome_notifier_service_factory.cc

Issue 11745024: Synced Notification Sync Change Processor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Lint fixes Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/notifier/chrome_notifier_service_factory.h"
6
7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/notifier/chrome_notifier_service.h"
9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile_dependency_manager.h"
11
12 namespace notifier {
13
14 // static
15 ChromeNotifierService* ChromeNotifierServiceFactory::GetForProfile(
16 Profile* profile, Profile::ServiceAccessType sat) {
17 return static_cast<ChromeNotifierService*>(
18 GetInstance()->GetServiceForProfile(profile, true));
19 }
20
21 // static
22 ChromeNotifierServiceFactory* ChromeNotifierServiceFactory::GetInstance() {
23 return Singleton<ChromeNotifierServiceFactory>::get();
24 }
25
26 ChromeNotifierServiceFactory::ChromeNotifierServiceFactory()
27 : ProfileKeyedServiceFactory(
28 "ChromeNotifierService", ProfileDependencyManager::GetInstance()) {}
29
30 ChromeNotifierServiceFactory::~ChromeNotifierServiceFactory() {
31 }
32
33 ProfileKeyedService*
34 ChromeNotifierServiceFactory::BuildServiceInstanceFor(Profile* profile) const {
35 NotificationUIManager* notification_manager =
36 g_browser_process->notification_ui_manager();
37 ChromeNotifierService* chrome_notifier_service =
38 new ChromeNotifierService(profile, notification_manager);
39 return chrome_notifier_service;
40 }
41
42 } // namespace notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698