Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_INVALIDATION_SERVICE_FACTORY_H_ | |
| 6 #define CHROME_BROWSER_INVALIDATION_SERVICE_FACTORY_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/memory/singleton.h" | |
| 10 #include "chrome/browser/profiles/profile_keyed_service_factory.h" | |
| 11 | |
| 12 class InvalidationService; | |
| 13 class P2PInvalidationService; | |
| 14 class Profile; | |
| 15 | |
| 16 class InvalidationServiceFactory : public ProfileKeyedServiceFactory { | |
| 17 public: | |
| 18 | |
| 19 static InvalidationService* GetForProfile(Profile* profile); | |
| 20 | |
| 21 static InvalidationServiceFactory* GetInstance(); | |
| 22 | |
| 23 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
| |
| 24 static ProfileKeyedService* BuildP2PInvalidationServiceFor(Profile* profile); | |
| 25 | |
| 26 private: | |
| 27 friend struct DefaultSingletonTraits<InvalidationServiceFactory>; | |
| 28 | |
| 29 InvalidationServiceFactory(); | |
| 30 virtual ~InvalidationServiceFactory(); | |
| 31 | |
| 32 // ProfileKeyedServiceFactory: | |
| 33 virtual ProfileKeyedService* BuildServiceInstanceFor( | |
| 34 Profile* profile) const OVERRIDE; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(InvalidationServiceFactory); | |
| 37 }; | |
| 38 | |
| 39 #endif // CHROME_BROWSER_INVALIDATION_SERVICE_FACTORY_H_ | |
| 40 | |
| OLD | NEW |