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

Unified Diff: chrome/browser/invalidation_service_factory.h

Issue 13197004: Draft: InvalidationService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Passes tests Created 7 years, 8 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/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_
+

Powered by Google App Engine
This is Rietveld 408576698