OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_P2P_SYNC_REFRESHER_H_ |
| 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_P2P_SYNC_REFRESHER_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "chrome/browser/sync/profile_sync_service_observer.h" |
| 10 |
| 11 class ProfileSyncService; |
| 12 |
| 13 // This class observes ProfileSyncService events and emits refresh notifications |
| 14 // to other test profiles for any committed changes it observes. |
| 15 // |
| 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; |
| 22 |
| 23 // Implementation of ProfileSyncServiceObserver |
| 24 void OnStateChanged() override; |
| 25 void OnSyncCycleCompleted() override; |
| 26 |
| 27 private: |
| 28 ProfileSyncService* sync_service_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(P2PSyncRefresher); |
| 31 }; |
| 32 |
| 33 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_P2P_SYNC_REFRESHER_H_ |
OLD | NEW |