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

Side by Side Diff: sync/test/mock_invalidation_tracker.h

Issue 1545553003: Switch to standard integer types in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « sync/test/mock_invalidation.cc ('k') | sync/test/mock_invalidation_tracker.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 2014 The Chromium Authors. All rights reserved. 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 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_TEST_MOCK_INVALIDATION_TRACKER_H_ 5 #ifndef SYNC_TEST_MOCK_INVALIDATION_TRACKER_H_
6 #define SYNC_TEST_MOCK_INVALIDATION_TRACKER_H_ 6 #define SYNC_TEST_MOCK_INVALIDATION_TRACKER_H_
7 7
8 #include <stdint.h>
9
8 #include <set> 10 #include <set>
9 #include <string> 11 #include <string>
10 12
11 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
12 #include "sync/test/trackable_mock_invalidation.h" 14 #include "sync/test/trackable_mock_invalidation.h"
13 15
14 namespace syncer { 16 namespace syncer {
15 17
16 // Instantiates and track the acknowledgement state of 18 // Instantiates and track the acknowledgement state of
17 // TrackableMockInvalidations. 19 // TrackableMockInvalidations.
18 class MockInvalidationTracker { 20 class MockInvalidationTracker {
19 public: 21 public:
20 // Builers to return new TrackableMockInvalidations associated with this 22 // Builers to return new TrackableMockInvalidations associated with this
21 // object. 23 // object.
22 scoped_ptr<TrackableMockInvalidation> IssueUnknownVersionInvalidation(); 24 scoped_ptr<TrackableMockInvalidation> IssueUnknownVersionInvalidation();
23 scoped_ptr<TrackableMockInvalidation> IssueInvalidation( 25 scoped_ptr<TrackableMockInvalidation> IssueInvalidation(
24 int64 version, 26 int64_t version,
25 const std::string& payload); 27 const std::string& payload);
26 28
27 MockInvalidationTracker(); 29 MockInvalidationTracker();
28 ~MockInvalidationTracker(); 30 ~MockInvalidationTracker();
29 31
30 // Records the acknowledgement of the invalidation 32 // Records the acknowledgement of the invalidation
31 // specified by the given ID. 33 // specified by the given ID.
32 void Acknowledge(int invaliation_id); 34 void Acknowledge(int invaliation_id);
33 35
34 // Records the drop of the invalidation specified by the given ID. 36 // Records the drop of the invalidation specified by the given ID.
(...skipping 22 matching lines...) Expand all
57 // acknowledged or dropped items to the proper set. An invalidation may be 59 // acknowledged or dropped items to the proper set. An invalidation may be
58 // both dropped and acknowledged if it represents the recovery from a drop 60 // both dropped and acknowledged if it represents the recovery from a drop
59 // event. 61 // event.
60 std::set<int> dropped_; 62 std::set<int> dropped_;
61 std::set<int> acknowledged_; 63 std::set<int> acknowledged_;
62 }; 64 };
63 65
64 } // namespace syncer 66 } // namespace syncer
65 67
66 #endif // SYNC_TEST_MOCK_INVALIDATION_TRACKER_H_ 68 #endif // SYNC_TEST_MOCK_INVALIDATION_TRACKER_H_
OLDNEW
« no previous file with comments | « sync/test/mock_invalidation.cc ('k') | sync/test/mock_invalidation_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698