Index: sync/test/mock_invalidation_tracker.cc |
diff --git a/sync/test/mock_invalidation_tracker.cc b/sync/test/mock_invalidation_tracker.cc |
deleted file mode 100644 |
index 3ba02d9936dd4b97af3f732f903a6d7cde2201d2..0000000000000000000000000000000000000000 |
--- a/sync/test/mock_invalidation_tracker.cc |
+++ /dev/null |
@@ -1,65 +0,0 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "sync/test/mock_invalidation_tracker.h" |
- |
-#include <stdint.h> |
- |
-#include "base/logging.h" |
-#include "sync/test/trackable_mock_invalidation.h" |
- |
-namespace syncer { |
- |
-std::unique_ptr<TrackableMockInvalidation> |
-MockInvalidationTracker::IssueUnknownVersionInvalidation() { |
- return std::unique_ptr<TrackableMockInvalidation>( |
- new TrackableMockInvalidation(true, -1, std::string(), this, next_id_++)); |
-} |
- |
-std::unique_ptr<TrackableMockInvalidation> |
-MockInvalidationTracker::IssueInvalidation(int64_t version, |
- const std::string& payload) { |
- return std::unique_ptr<TrackableMockInvalidation>( |
- new TrackableMockInvalidation(false, version, payload, this, next_id_++)); |
-} |
- |
-MockInvalidationTracker::MockInvalidationTracker() : next_id_(0) { |
-} |
- |
-MockInvalidationTracker::~MockInvalidationTracker() { |
-} |
- |
-void MockInvalidationTracker::Acknowledge(int invalidation_id) { |
- acknowledged_.insert(invalidation_id); |
-} |
- |
-void MockInvalidationTracker::Drop(int invalidation_id) { |
- dropped_.insert(invalidation_id); |
-} |
- |
-bool MockInvalidationTracker::IsUnacked(int invalidation_id) const { |
- DCHECK_LE(invalidation_id, next_id_); |
- return !IsAcknowledged(invalidation_id) && !IsDropped(invalidation_id); |
-} |
- |
-bool MockInvalidationTracker::IsAcknowledged(int invalidation_id) const { |
- DCHECK_LE(invalidation_id, next_id_); |
- return acknowledged_.find(invalidation_id) != acknowledged_.end(); |
-} |
- |
-bool MockInvalidationTracker::IsDropped(int invalidation_id) const { |
- DCHECK_LE(invalidation_id, next_id_); |
- return dropped_.find(invalidation_id) != dropped_.end(); |
-} |
- |
-bool MockInvalidationTracker::AllInvalidationsAccountedFor() const { |
- for (int i = 0; i < next_id_; ++i) { |
- if (IsUnacked(i)) { |
- return false; |
- } |
- } |
- return true; |
-} |
- |
-} // namespace syncer |