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

Unified Diff: trunk/src/chrome/browser/invalidation/invalidation_service_factory.h

Issue 17610004: Revert 208315 "Make use of InvalidationService" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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: trunk/src/chrome/browser/invalidation/invalidation_service_factory.h
===================================================================
--- trunk/src/chrome/browser/invalidation/invalidation_service_factory.h (revision 208346)
+++ trunk/src/chrome/browser/invalidation/invalidation_service_factory.h (working copy)
@@ -9,22 +9,15 @@
#include "base/memory/singleton.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h"
-namespace user_prefs {
-class PrefRegistrySyncable;
-}
-
namespace syncer {
class Invalidator;
}
+class InvalidationFrontend;
class Profile;
namespace invalidation {
-class InvalidationService;
-class P2PInvalidationService;
-class FakeInvalidationService;
-
// A BrowserContextKeyedServiceFactory to construct InvalidationServices. The
// implementation of the InvalidationService may be completely different on
// different platforms; this class should help to hide this complexity. It also
@@ -32,19 +25,17 @@
// on invalidations.
class InvalidationServiceFactory : public BrowserContextKeyedServiceFactory {
public:
- static InvalidationService* GetForProfile(Profile* profile);
+ // TODO(rlarocque): Re-enable this once InvalidationFrontend can extend
+ // BrowserContextKeyedService.
+ // static InvalidationFrontend* GetForProfile(Profile* profile);
static InvalidationServiceFactory* GetInstance();
- // A helper function to set this factory to return FakeInvalidationServices
- // instead of the default InvalidationService objects.
- void SetBuildOnlyFakeInvalidatorsForTest(bool test_mode_enabled);
+ static BrowserContextKeyedService* BuildP2PInvalidationServiceFor(
+ Profile* profile);
+ static BrowserContextKeyedService* BuildTestServiceInstanceFor(
+ Profile* profile);
- // These helper functions to set the factory to build a test-only type of
- // invalidator and return the instance immeidately.
- P2PInvalidationService* BuildAndUseP2PInvalidationServiceForTest(
- content::BrowserContext* context);
-
private:
friend struct DefaultSingletonTraits<InvalidationServiceFactory>;
@@ -53,13 +44,11 @@
// BrowserContextKeyedServiceFactory:
virtual BrowserContextKeyedService* BuildServiceInstanceFor(
- content::BrowserContext* context) const OVERRIDE;
- virtual void RegisterUserPrefs(
- user_prefs::PrefRegistrySyncable* registry) OVERRIDE;
+ content::BrowserContext* profile) const OVERRIDE;
+ // TODO(rlarocque): Use this class, not InvalidatorStorage, to register
+ // for user prefs.
+ // virtual void RegisterUserPrefs(PrefRegistrySyncable* registry) OVERRIDE;
- // If true, this factory will return only FakeInvalidationService instances.
- bool build_fake_invalidators_;
-
DISALLOW_COPY_AND_ASSIGN(InvalidationServiceFactory);
};

Powered by Google App Engine
This is Rietveld 408576698