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_invalidation_forwarder.h
blobbe10c92f5a05fe5ed75b4ee87bd885bc0d8529f7
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_INVALIDATION_FORWARDER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_P2P_INVALIDATION_FORWARDER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/sync/profile_sync_service_observer.h"
12 class ProfileSyncService;
14 namespace invalidation {
15 class P2PInvalidationService;
18 // This class links the ProfileSyncService to a P2PInvalidationService.
20 // It will observe ProfileSyncService events and emit invalidation events for
21 // any committed changes in observes.
23 // It register and unregisters in its constructor and destructor. This is
24 // intended to make it easy to manage with a scoped_ptr.
25 class P2PInvalidationForwarder : public ProfileSyncServiceObserver {
26 public:
27 P2PInvalidationForwarder(
28 ProfileSyncService* sync_service,
29 invalidation::P2PInvalidationService* invalidation_service);
30 ~P2PInvalidationForwarder() override;
32 // Implementation of ProfileSyncServiceObserver
33 void OnStateChanged() override;
34 void OnSyncCycleCompleted() override;
36 private:
37 ProfileSyncService* sync_service_;
38 invalidation::P2PInvalidationService* invalidation_service_;
40 DISALLOW_COPY_AND_ASSIGN(P2PInvalidationForwarder);
43 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_P2P_INVALIDATION_FORWARDER_H_