OLD | NEW |
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 #include "components/sync/test/mock_invalidation_tracker.h" | 5 #include "components/sync/test/mock_invalidation_tracker.h" |
6 | 6 |
7 #include <stdint.h> | |
8 | |
9 #include "base/logging.h" | 7 #include "base/logging.h" |
10 #include "components/sync/test/trackable_mock_invalidation.h" | |
11 | 8 |
12 namespace syncer { | 9 namespace syncer { |
13 | 10 |
14 std::unique_ptr<TrackableMockInvalidation> | 11 std::unique_ptr<TrackableMockInvalidation> |
15 MockInvalidationTracker::IssueUnknownVersionInvalidation() { | 12 MockInvalidationTracker::IssueUnknownVersionInvalidation() { |
16 return std::unique_ptr<TrackableMockInvalidation>( | 13 return std::unique_ptr<TrackableMockInvalidation>( |
17 new TrackableMockInvalidation(true, -1, std::string(), this, next_id_++)); | 14 new TrackableMockInvalidation(true, -1, std::string(), this, next_id_++)); |
18 } | 15 } |
19 | 16 |
20 std::unique_ptr<TrackableMockInvalidation> | 17 std::unique_ptr<TrackableMockInvalidation> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 bool MockInvalidationTracker::AllInvalidationsAccountedFor() const { | 51 bool MockInvalidationTracker::AllInvalidationsAccountedFor() const { |
55 for (int i = 0; i < next_id_; ++i) { | 52 for (int i = 0; i < next_id_; ++i) { |
56 if (IsUnacked(i)) { | 53 if (IsUnacked(i)) { |
57 return false; | 54 return false; |
58 } | 55 } |
59 } | 56 } |
60 return true; | 57 return true; |
61 } | 58 } |
62 | 59 |
63 } // namespace syncer | 60 } // namespace syncer |
OLD | NEW |