| 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 IOS_CHROME_BROWSER_SYNC_IOS_USER_EVENT_SERVICE_FACTORY_H_ | 
|  | 6 #define IOS_CHROME_BROWSER_SYNC_IOS_USER_EVENT_SERVICE_FACTORY_H_ | 
|  | 7 | 
|  | 8 #include <memory> | 
|  | 9 | 
|  | 10 #include "base/macros.h" | 
|  | 11 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h" | 
|  | 12 | 
|  | 13 namespace base { | 
|  | 14 template <typename T> | 
|  | 15 struct DefaultSingletonTraits; | 
|  | 16 }  // namespace base | 
|  | 17 | 
|  | 18 namespace ios { | 
|  | 19 class ChromeBrowserState; | 
|  | 20 }  // namespace ios | 
|  | 21 | 
|  | 22 namespace syncer { | 
|  | 23 class UserEventService; | 
|  | 24 }  // namespace syncer | 
|  | 25 | 
|  | 26 // Singleton that associates UserEventServices to ChromeBrowserStates. | 
|  | 27 class IOSUserEventServiceFactory : public BrowserStateKeyedServiceFactory { | 
|  | 28  public: | 
|  | 29   static syncer::UserEventService* GetForBrowserState( | 
|  | 30       ios::ChromeBrowserState* browser_state); | 
|  | 31 | 
|  | 32   static IOSUserEventServiceFactory* GetInstance(); | 
|  | 33 | 
|  | 34  private: | 
|  | 35   friend struct base::DefaultSingletonTraits<IOSUserEventServiceFactory>; | 
|  | 36 | 
|  | 37   IOSUserEventServiceFactory(); | 
|  | 38   ~IOSUserEventServiceFactory() override; | 
|  | 39 | 
|  | 40   // BrowserStateKeyedServiceFactory implementation. | 
|  | 41   std::unique_ptr<KeyedService> BuildServiceInstanceFor( | 
|  | 42       web::BrowserState* context) const override; | 
|  | 43   web::BrowserState* GetBrowserStateToUse( | 
|  | 44       web::BrowserState* context) const override; | 
|  | 45 }; | 
|  | 46 | 
|  | 47 #endif  // IOS_CHROME_BROWSER_SYNC_IOS_USER_EVENT_SERVICE_FACTORY_H_ | 
| OLD | NEW | 
|---|