Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Side by Side Diff: ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h

Issue 2643723004: Add Desktop iOS promotion logging to chrome ios app. (Closed)
Patch Set: to be submitted Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_SIGNIN_DESKTOP_PROMOTION_SYNC_OBSERVER_H_
6 #define IOS_CHROME_BROWSER_SIGNIN_DESKTOP_PROMOTION_SYNC_OBSERVER_H_
7
8 #include "base/macros.h"
9 #include "components/sync/driver/sync_service_observer.h"
10
11 namespace browser_sync {
12 class ProfileSyncService;
13 }
14
15 class PrefService;
16
17 // This class will implement ProfileSyncServiceObserver and will attach it self
18 // to the sync service to observe the sync state change.
19 // Once the sync state is changed and priority prefs are synced, the observer
20 // will check the desktop promotion prefs, and if eligilble it will log desktop
21 // promotion metrics to uma and mark the promotion cycle as completed in a perf.
22 class DesktopPromotionSyncObserver : public syncer::SyncServiceObserver {
23 public:
24 DesktopPromotionSyncObserver(PrefService* pref_service,
25 browser_sync::ProfileSyncService* sync_service);
26
27 ~DesktopPromotionSyncObserver() override;
28
29 // ProfileSyncServiceObserver implementation.
30 void OnStateChanged() override;
31
32 private:
33 PrefService* pref_service_;
34 browser_sync::ProfileSyncService* sync_service_;
35 bool desktop_metrics_logger_initiated_;
36
37 DISALLOW_COPY_AND_ASSIGN(DesktopPromotionSyncObserver);
38 };
39
40 #endif // IOS_CHROME_BROWSER_SIGNIN_DESKTOP_PROMOTION_SYNC_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698