Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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_SYNC_USER_EVENT_SERVICE_FACTORY_H_ | |
| 6 #define CHROME_BROWSER_SYNC_USER_EVENT_SERVICE_FACTORY_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/singleton.h" | |
| 10 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" | |
| 11 | |
| 12 class Profile; | |
| 13 | |
| 14 namespace syncer { | |
| 15 class UserEventService; | |
| 16 } // namespace syncer | |
| 17 | |
| 18 namespace browser_sync { | |
| 19 | |
| 20 // Factory for BrowserKeyedService UserEventService. | |
|
Patrick Noland
2017/05/08 22:42:37
Maybe this is c/p boilerplate, but I don't think t
skym
2017/05/08 23:35:27
Done.
| |
| 21 class UserEventServiceFactory : public BrowserContextKeyedServiceFactory { | |
| 22 public: | |
| 23 static syncer::UserEventService* GetForProfile(Profile* profile); | |
| 24 static UserEventServiceFactory* GetInstance(); | |
| 25 | |
| 26 private: | |
| 27 friend struct base::DefaultSingletonTraits<UserEventServiceFactory>; | |
| 28 | |
| 29 UserEventServiceFactory(); | |
| 30 ~UserEventServiceFactory() override; | |
| 31 | |
| 32 // BrowserContextKeyedServiceFactory: | |
| 33 KeyedService* BuildServiceInstanceFor( | |
| 34 content::BrowserContext* context) const override; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(UserEventServiceFactory); | |
| 37 }; | |
| 38 | |
| 39 } // namespace browser_sync | |
| 40 | |
| 41 #endif // CHROME_BROWSER_SYNC_USER_EVENT_SERVICE_FACTORY_H_ | |
| OLD | NEW |