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

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

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_tracker.h ('k') | sync/test/null_directory_change_delegate.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 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 "sync/test/mock_invalidation_tracker.h" 5 #include "sync/test/mock_invalidation_tracker.h"
6 6
7 #include <stdint.h>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "sync/test/trackable_mock_invalidation.h" 10 #include "sync/test/trackable_mock_invalidation.h"
9 11
10 namespace syncer { 12 namespace syncer {
11 13
12 scoped_ptr<TrackableMockInvalidation> 14 scoped_ptr<TrackableMockInvalidation>
13 MockInvalidationTracker::IssueUnknownVersionInvalidation() { 15 MockInvalidationTracker::IssueUnknownVersionInvalidation() {
14 return scoped_ptr<TrackableMockInvalidation>( 16 return scoped_ptr<TrackableMockInvalidation>(
15 new TrackableMockInvalidation(true, -1, std::string(), this, next_id_++)); 17 new TrackableMockInvalidation(true, -1, std::string(), this, next_id_++));
16 } 18 }
17 19
18 scoped_ptr<TrackableMockInvalidation> 20 scoped_ptr<TrackableMockInvalidation>
19 MockInvalidationTracker::IssueInvalidation(int64 version, 21 MockInvalidationTracker::IssueInvalidation(int64_t version,
20 const std::string& payload) { 22 const std::string& payload) {
21 return scoped_ptr<TrackableMockInvalidation>( 23 return scoped_ptr<TrackableMockInvalidation>(
22 new TrackableMockInvalidation(false, version, payload, this, next_id_++)); 24 new TrackableMockInvalidation(false, version, payload, this, next_id_++));
23 } 25 }
24 26
25 MockInvalidationTracker::MockInvalidationTracker() : next_id_(0) { 27 MockInvalidationTracker::MockInvalidationTracker() : next_id_(0) {
26 } 28 }
27 29
28 MockInvalidationTracker::~MockInvalidationTracker() { 30 MockInvalidationTracker::~MockInvalidationTracker() {
29 } 31 }
(...skipping 24 matching lines...) Expand all
54 bool MockInvalidationTracker::AllInvalidationsAccountedFor() const { 56 bool MockInvalidationTracker::AllInvalidationsAccountedFor() const {
55 for (int i = 0; i < next_id_; ++i) { 57 for (int i = 0; i < next_id_; ++i) {
56 if (IsUnacked(i)) { 58 if (IsUnacked(i)) {
57 return false; 59 return false;
58 } 60 }
59 } 61 }
60 return true; 62 return true;
61 } 63 }
62 64
63 } // namespace syncer 65 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/test/mock_invalidation_tracker.h ('k') | sync/test/null_directory_change_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698