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

Side by Side Diff: chrome/browser/notifications/sync_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: Synced Notification Change Processor - remove unused header 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/notifications/sync_notifier/chrome_notifier_service_fac tory.h"
6
7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h"
9 #include "chrome/browser/profiles/profile_dependency_manager.h"
10
11 namespace notifier {
12
13 // static
14 ChromeNotifierService* ChromeNotifierServiceFactory::GetForProfile(
15 Profile* profile, Profile::ServiceAccessType sat) {
16 return static_cast<ChromeNotifierService*>(
17 GetInstance()->GetServiceForProfile(profile, true));
18 }
19
20 // static
21 ChromeNotifierServiceFactory* ChromeNotifierServiceFactory::GetInstance() {
22 return Singleton<ChromeNotifierServiceFactory>::get();
23 }
24
25 ChromeNotifierServiceFactory::ChromeNotifierServiceFactory()
26 : ProfileKeyedServiceFactory(
27 "ChromeNotifierService", ProfileDependencyManager::GetInstance()) {}
28
29 ChromeNotifierServiceFactory::~ChromeNotifierServiceFactory() {
30 }
31
32 ProfileKeyedService*
33 ChromeNotifierServiceFactory::BuildServiceInstanceFor(Profile* profile) const {
34 NotificationUIManager* notification_manager =
35 g_browser_process->notification_ui_manager();
36 ChromeNotifierService* chrome_notifier_service =
37 new ChromeNotifierService(profile, notification_manager);
38 return chrome_notifier_service;
39 }
40
41 } // namespace notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698