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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc
diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..aff915a0895580d4de240fff563b88a448ed08f7
--- /dev/null
+++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc
@@ -0,0 +1,41 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h"
+
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h"
+#include "chrome/browser/profiles/profile_dependency_manager.h"
+
+namespace notifier {
+
+// static
+ChromeNotifierService* ChromeNotifierServiceFactory::GetForProfile(
+ Profile* profile, Profile::ServiceAccessType sat) {
+ return static_cast<ChromeNotifierService*>(
+ GetInstance()->GetServiceForProfile(profile, true));
+}
+
+// static
+ChromeNotifierServiceFactory* ChromeNotifierServiceFactory::GetInstance() {
+ return Singleton<ChromeNotifierServiceFactory>::get();
+}
+
+ChromeNotifierServiceFactory::ChromeNotifierServiceFactory()
+ : ProfileKeyedServiceFactory(
+ "ChromeNotifierService", ProfileDependencyManager::GetInstance()) {}
+
+ChromeNotifierServiceFactory::~ChromeNotifierServiceFactory() {
+}
+
+ProfileKeyedService*
+ChromeNotifierServiceFactory::BuildServiceInstanceFor(Profile* profile) const {
+ NotificationUIManager* notification_manager =
+ g_browser_process->notification_ui_manager();
+ ChromeNotifierService* chrome_notifier_service =
+ new ChromeNotifierService(profile, notification_manager);
+ return chrome_notifier_service;
+}
+
+} // namespace notifier

Powered by Google App Engine
This is Rietveld 408576698