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

Side by Side Diff: sync/notifier/fake_invalidation_handler.h

Issue 10916131: [Invalidations] Add GetInvalidatorState() to Invalidator{,Frontend} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « sync/internal_api/test/fake_sync_manager.cc ('k') | sync/notifier/fake_invalidation_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_NOTIFIER_FAKE_SYNC_NOTIFIER_OBSERVER_H_ 5 #ifndef SYNC_NOTIFIER_FAKE_SYNC_NOTIFIER_OBSERVER_H_
6 #define SYNC_NOTIFIER_FAKE_SYNC_NOTIFIER_OBSERVER_H_ 6 #define SYNC_NOTIFIER_FAKE_SYNC_NOTIFIER_OBSERVER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "sync/notifier/invalidation_handler.h" 12 #include "sync/notifier/invalidation_handler.h"
12 13
13 namespace syncer { 14 namespace syncer {
14 15
15 class FakeInvalidationHandler : public InvalidationHandler { 16 class FakeInvalidationHandler : public InvalidationHandler {
16 public: 17 public:
17 FakeInvalidationHandler(); 18 FakeInvalidationHandler();
18 virtual ~FakeInvalidationHandler(); 19 virtual ~FakeInvalidationHandler();
19 20
20 NotificationsDisabledReason GetNotificationsDisabledReason() const; 21 InvalidatorState GetInvalidatorState() const;
21 const ObjectIdStateMap& GetLastNotificationIdStateMap() const; 22 const ObjectIdStateMap& GetLastInvalidationIdStateMap() const;
22 IncomingNotificationSource GetLastNotificationSource() const; 23 IncomingInvalidationSource GetLastInvalidationSource() const;
23 int GetNotificationCount() const; 24 int GetInvalidationCount() const;
24 25
25 // InvalidationHandler implementation. 26 // InvalidationHandler implementation.
26 virtual void OnNotificationsEnabled() OVERRIDE; 27 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE;
27 virtual void OnNotificationsDisabled( 28 virtual void OnIncomingInvalidation(
28 NotificationsDisabledReason reason) OVERRIDE;
29 virtual void OnIncomingNotification(
30 const ObjectIdStateMap& id_state_map, 29 const ObjectIdStateMap& id_state_map,
31 IncomingNotificationSource source) OVERRIDE; 30 IncomingInvalidationSource source) OVERRIDE;
32 31
33 private: 32 private:
34 NotificationsDisabledReason reason_; 33 InvalidatorState state_;
35 ObjectIdStateMap last_id_state_map_; 34 ObjectIdStateMap last_id_state_map_;
36 IncomingNotificationSource last_source_; 35 IncomingInvalidationSource last_source_;
37 int notification_count_; 36 int invalidation_count_;
37
38 DISALLOW_COPY_AND_ASSIGN(FakeInvalidationHandler);
38 }; 39 };
39 40
40 } // namespace syncer 41 } // namespace syncer
41 42
42 #endif // SYNC_NOTIFIER_FAKE_SYNC_NOTIFIER_OBSERVER_H_ 43 #endif // SYNC_NOTIFIER_FAKE_SYNC_NOTIFIER_OBSERVER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/test/fake_sync_manager.cc ('k') | sync/notifier/fake_invalidation_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698