Index: chrome/browser/invalidation_service_factory.h |
diff --git a/chrome/browser/invalidation_service_factory.h b/chrome/browser/invalidation_service_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0892b68e5f86955514cdf2d5612bf73f80325d9c |
--- /dev/null |
+++ b/chrome/browser/invalidation_service_factory.h |
@@ -0,0 +1,40 @@ |
+// 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. |
+ |
+#ifndef CHROME_BROWSER_INVALIDATION_SERVICE_FACTORY_H_ |
+#define CHROME_BROWSER_INVALIDATION_SERVICE_FACTORY_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/singleton.h" |
+#include "chrome/browser/profiles/profile_keyed_service_factory.h" |
+ |
+class InvalidationService; |
+class P2PInvalidationService; |
+class Profile; |
+ |
+class InvalidationServiceFactory : public ProfileKeyedServiceFactory { |
+ public: |
+ |
+ static InvalidationService* GetForProfile(Profile* profile); |
+ |
+ static InvalidationServiceFactory* GetInstance(); |
+ |
+ static ProfileKeyedService* BuildTestServiceInstanceFor(Profile* profile); |
tim (not reviewing)
2013/04/15 16:48:24
Why are the Build functions made public?
rlarocque
2013/04/22 21:47:15
That's so we can use it with ProfileKeyedServiceFa
|
+ static ProfileKeyedService* BuildP2PInvalidationServiceFor(Profile* profile); |
+ |
+ private: |
+ friend struct DefaultSingletonTraits<InvalidationServiceFactory>; |
+ |
+ InvalidationServiceFactory(); |
+ virtual ~InvalidationServiceFactory(); |
+ |
+ // ProfileKeyedServiceFactory: |
+ virtual ProfileKeyedService* BuildServiceInstanceFor( |
+ Profile* profile) const OVERRIDE; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(InvalidationServiceFactory); |
+}; |
+ |
+#endif // CHROME_BROWSER_INVALIDATION_SERVICE_FACTORY_H_ |
+ |