Fire an error if a pref used in the UI is missing once all prefs are fetched.
[chromium-blink-merge.git] / chrome / browser / sync / test / integration / p2p_sync_refresher.h
blob7e7fc57e241e90efa8d4e237744501cf68951bce
1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_P2P_SYNC_REFRESHER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_P2P_SYNC_REFRESHER_H_
8 #include "base/basictypes.h"
9 #include "chrome/browser/sync/profile_sync_service_observer.h"
11 class ProfileSyncService;
13 // This class observes ProfileSyncService events and emits refresh notifications
14 // to other test profiles for any committed changes it observes.
16 // It register and unregisters in its constructor and destructor. This is
17 // intended to make it easy to manage with a scoped_ptr.
18 class P2PSyncRefresher : public ProfileSyncServiceObserver {
19 public:
20 explicit P2PSyncRefresher(ProfileSyncService* sync_service);
21 ~P2PSyncRefresher() override;
23 // Implementation of ProfileSyncServiceObserver
24 void OnStateChanged() override;
25 void OnSyncCycleCompleted() override;
27 private:
28 ProfileSyncService* sync_service_;
30 DISALLOW_COPY_AND_ASSIGN(P2PSyncRefresher);
33 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_P2P_SYNC_REFRESHER_H_