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

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

Issue 56113003: Implement new invalidations ack tracking system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modify drive TODO comment + rebase Created 7 years 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/notifier/invalidator_test_template.h ('k') | sync/notifier/non_blocking_invalidator.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MOCK_ACK_HANDLER_H_ 5 #ifndef SYNC_NOTIFIER_MOCK_ACK_HANDLER_H_
6 #define SYNC_NOTIFIER_MOCK_ACK_HANDLER_H_ 6 #define SYNC_NOTIFIER_MOCK_ACK_HANDLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "sync/base/sync_export.h" 12 #include "sync/base/sync_export.h"
13 #include "sync/internal_api/public/util/weak_handle.h" 13 #include "sync/internal_api/public/util/weak_handle.h"
14 #include "sync/notifier/ack_handler.h" 14 #include "sync/notifier/ack_handler.h"
15 15
16 namespace syncer { 16 namespace syncer {
17 17
18 class Invalidation; 18 class Invalidation;
19 19
20 // This AckHandler implementation colaborates with the FakeInvalidationService 20 // This AckHandler implementation colaborates with the FakeInvalidationService
21 // to enable unit tests to assert that invalidations are being acked properly. 21 // to enable unit tests to assert that invalidations are being acked properly.
22 class MockAckHandler 22 class SYNC_EXPORT MockAckHandler
23 : public AckHandler, 23 : public AckHandler,
24 public base::SupportsWeakPtr<MockAckHandler> { 24 public base::SupportsWeakPtr<MockAckHandler> {
25 public: 25 public:
26 MockAckHandler(); 26 MockAckHandler();
27 virtual ~MockAckHandler(); 27 virtual ~MockAckHandler();
28 28
29 // Sets up some internal state to track this invalidation, and modifies it so 29 // Sets up some internal state to track this invalidation, and modifies it so
30 // that its Acknowledge() and Drop() methods will route back to us. 30 // that its Acknowledge() and Drop() methods will route back to us.
31 void RegisterInvalidation(Invalidation* invalidation); 31 void RegisterInvalidation(Invalidation* invalidation);
32 32
(...skipping 22 matching lines...) Expand all
55 WeakHandle<AckHandler> WeakHandleThis(); 55 WeakHandle<AckHandler> WeakHandleThis();
56 56
57 InvalidationVector unsent_invalidations_; 57 InvalidationVector unsent_invalidations_;
58 InvalidationVector unacked_invalidations_; 58 InvalidationVector unacked_invalidations_;
59 InvalidationVector acked_invalidations_; 59 InvalidationVector acked_invalidations_;
60 }; 60 };
61 61
62 } // namespace syncer 62 } // namespace syncer
63 63
64 #endif // SYNC_NOTIFIER_MOCK_ACK_HANDLER_H_ 64 #endif // SYNC_NOTIFIER_MOCK_ACK_HANDLER_H_
OLDNEW
« no previous file with comments | « sync/notifier/invalidator_test_template.h ('k') | sync/notifier/non_blocking_invalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698