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_ |