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

Unified Diff: chrome/browser/notifier/chrome_notifier_service_factory.h

Issue 11745024: Synced Notification Sync Change Processor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: SyncedNotifications - first round of CR comment fixes. Created 7 years, 11 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/notifier/chrome_notifier_service_factory.h
diff --git a/chrome/browser/notifier/chrome_notifier_service_factory.h b/chrome/browser/notifier/chrome_notifier_service_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..da87cba5856033d3f8cd085295ecc193d724d370
--- /dev/null
+++ b/chrome/browser/notifier/chrome_notifier_service_factory.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 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.
+
+#ifndef CHROME_BROWSER_NOTIFIER_CHROME_NOTIFIER_SERVICE_FACTORY_H_
+#define CHROME_BROWSER_NOTIFIER_CHROME_NOTIFIER_SERVICE_FACTORY_H_
+
+#include "base/memory/singleton.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_keyed_service_factory.h"
+
+class ChromeNotifierService;
+
+// Singleton that owns all ChromeNotifierService and associates them with
+// Profiles.
dcheng 2013/01/18 21:56:13 I'm not really sure this comment adds anything. Re
Pete Williamson 2013/01/23 01:45:55 Done.
Pete Williamson 2013/01/23 01:45:55 Done.
+class ChromeNotifierServiceFactory : public ProfileKeyedServiceFactory {
+ public:
+ static ChromeNotifierService* GetForProfile(
+ Profile* profile, Profile::ServiceAccessType sat);
+
+ static ChromeNotifierService* GetForProfileIfExists(
dcheng 2013/01/18 21:56:13 Is there a reason we need GetForProfileIfExists()
Pete Williamson 2013/01/23 01:45:55 Nope, removed. I thought it was inherited from th
+ Profile* profile, Profile::ServiceAccessType sat);
+
+ static ChromeNotifierService* GetForProfileWithoutCreating(
+ Profile* profile);
+
+ static ChromeNotifierServiceFactory* GetInstance();
+
+ private:
+ friend struct DefaultSingletonTraits<ChromeNotifierServiceFactory>;
+
+ ChromeNotifierServiceFactory();
+ virtual ~ChromeNotifierServiceFactory();
+
+ // ProfileKeyedServiceFactory:
+ virtual ProfileKeyedService* BuildServiceInstanceFor(
+ Profile* profile) const OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+};
+
+#endif // CHROME_BROWSER_NOTIFIER_CHROME_NOTIFIER_SERVICE_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698