Chromium Code Reviews| Index: ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service_factory.h |
| diff --git a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service_factory.h b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..35e5fc7591633ac5d86ebd115a0ac1d6825dfc4d |
| --- /dev/null |
| +++ b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service_factory.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2017 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 IOS_CHROME_BROWSER_SIGNIN_DESKTOP_PROMOTION_SYNC_SERVICE_FACTORY_H_ |
| +#define IOS_CHROME_BROWSER_SIGNIN_DESKTOP_PROMOTION_SYNC_SERVICE_FACTORY_H_ |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/singleton.h" |
| +#include "components/keyed_service/ios/browser_state_keyed_service_factory.h" |
| + |
| +namespace ios { |
| +class ChromeBrowserState; |
| +} |
| + |
| +class DesktopPromotionSyncService; |
| + |
| +class DesktopPromotionSyncServiceFactory |
|
sdefresne
2017/01/26 17:03:25
nit: document (you can copy from another service f
mrefaat
2017/01/26 23:34:12
Acknowledged.
|
| + : public BrowserStateKeyedServiceFactory { |
| + public: |
| + static DesktopPromotionSyncService* GetForBrowserState( |
| + ios::ChromeBrowserState* browser_state); |
| + static DesktopPromotionSyncServiceFactory* GetInstance(); |
| + |
| + private: |
| + friend struct base::DefaultSingletonTraits< |
| + DesktopPromotionSyncServiceFactory>; |
| + |
| + DesktopPromotionSyncServiceFactory(); |
| + ~DesktopPromotionSyncServiceFactory() override; |
| + |
| + // BrowserStateKeyedServiceFactory implementation. |
| + std::unique_ptr<KeyedService> BuildServiceInstanceFor( |
| + web::BrowserState* context) const override; |
| + bool ServiceIsNULLWhileTesting() const override; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DesktopPromotionSyncServiceFactory); |
| +}; |
| + |
| +#endif // IOS_CHROME_BROWSER_SIGNIN_DESKTOP_PROMOTION_SYNC_SERVICE_FACTORY_H_ |