OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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 SYNC_NOTIFIER_FAKE_SYNC_NOTIFIER_OBSERVER_H_ | |
6 #define SYNC_NOTIFIER_FAKE_SYNC_NOTIFIER_OBSERVER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/compiler_specific.h" | |
11 #include "sync/notifier/sync_notifier_observer.h" | |
12 | |
13 namespace syncer { | |
14 | |
15 class FakeSyncNotifierObserver : public SyncNotifierObserver { | |
16 public: | |
17 FakeSyncNotifierObserver(); | |
18 virtual ~FakeSyncNotifierObserver(); | |
19 | |
20 NotificationsDisabledReason GetNotificationsDisabledReason() const; | |
21 const ObjectIdStateMap& GetLastNotificationIdStateMap() const; | |
22 IncomingNotificationSource GetLastNotificationSource() const; | |
23 int GetNotificationCount() const; | |
24 | |
25 // SyncNotifierObserver implementation. | |
26 virtual void OnNotificationsEnabled() OVERRIDE; | |
27 virtual void OnNotificationsDisabled( | |
28 NotificationsDisabledReason reason) OVERRIDE; | |
29 virtual void OnIncomingNotification( | |
30 const ObjectIdStateMap& id_state_map, | |
31 IncomingNotificationSource source) OVERRIDE; | |
32 | |
33 private: | |
34 NotificationsDisabledReason reason_; | |
35 ObjectIdStateMap last_id_state_map_; | |
36 IncomingNotificationSource last_source_; | |
37 int notification_count_; | |
38 }; | |
39 | |
40 } // namespace syncer | |
41 | |
42 #endif // SYNC_NOTIFIER_FAKE_SYNC_NOTIFIER_OBSERVER_H_ | |
OLD | NEW |