Chromium Code Reviews| Index: ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h |
| diff --git a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d6a993228cebe4b9c19f0ca5e0781627563a8b43 |
| --- /dev/null |
| +++ b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h |
| @@ -0,0 +1,29 @@ |
| +// 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_OBSERVER_LOGGER_H_ |
| +#define IOS_CHROME_BROWSER_SIGNIN_DESKTOP_PROMOTION_SYNC_OBSERVER_LOGGER_H_ |
| + |
| +#include "base/macros.h" |
| +#include "components/sync/driver/sync_service_observer.h" |
| + |
| +namespace ios { |
| +class ChromeBrowserState; |
| +} |
| + |
| +class DesktopPromotionSyncObserver : public syncer::SyncServiceObserver { |
|
sdefresne
2017/01/25 09:52:52
If you want this observer to be created with the C
mrefaat1
2017/01/26 16:51:19
Thanks for the advice, as per our discussion on ha
|
| + public: |
| + explicit DesktopPromotionSyncObserver(ios::ChromeBrowserState* browser_state); |
| + ~DesktopPromotionSyncObserver() override; |
| + // ProfileSyncServiceObserver implementation. |
| + void OnStateChanged() override; |
| + |
| + private: |
| + ios::ChromeBrowserState* browser_state_; // weak |
| + bool desktop_metrics_logger_initiated_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DesktopPromotionSyncObserver); |
| +}; |
| + |
| +#endif // IOS_CHROME_BROWSER_SIGNIN_DESKTOP_PROMOTION_SYNC_OBSERVER_H_ |