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

Unified Diff: sync/test/mock_invalidation_tracker.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 months 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/mock_invalidation_tracker.h
diff --git a/sync/test/mock_invalidation_tracker.h b/sync/test/mock_invalidation_tracker.h
deleted file mode 100644
index 8afa505beb5636b61d6ced7f9536c1cffcc52927..0000000000000000000000000000000000000000
--- a/sync/test/mock_invalidation_tracker.h
+++ /dev/null
@@ -1,68 +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.
-
-#ifndef SYNC_TEST_MOCK_INVALIDATION_TRACKER_H_
-#define SYNC_TEST_MOCK_INVALIDATION_TRACKER_H_
-
-#include <stdint.h>
-
-#include <memory>
-#include <set>
-#include <string>
-
-#include "sync/test/trackable_mock_invalidation.h"
-
-namespace syncer {
-
-// Instantiates and track the acknowledgement state of
-// TrackableMockInvalidations.
-class MockInvalidationTracker {
- public:
- // Builers to return new TrackableMockInvalidations associated with this
- // object.
- std::unique_ptr<TrackableMockInvalidation> IssueUnknownVersionInvalidation();
- std::unique_ptr<TrackableMockInvalidation> IssueInvalidation(
- int64_t version,
- const std::string& payload);
-
- MockInvalidationTracker();
- ~MockInvalidationTracker();
-
- // Records the acknowledgement of the invalidation
- // specified by the given ID.
- void Acknowledge(int invaliation_id);
-
- // Records the drop of the invalidation specified by the given ID.
- void Drop(int invalidation_id);
-
- // Returns true if the invalidation associated with the given ID is neither
- // acknowledged nor dropped.
- bool IsUnacked(int invalidation_id) const;
-
- // Returns true if the invalidation associated with the given ID is
- // acknowledged.
- bool IsAcknowledged(int invalidation_id) const;
-
- // Returns true if the invalidation associated with the given ID is dropped.
- bool IsDropped(int invalidation_id) const;
-
- // Returns true if all issued invalidations were acknowledged or dropped.
- bool AllInvalidationsAccountedFor() const;
-
- private:
- // A counter used to assign strictly increasing IDs to each invalidation
- // issued by this class.
- int next_id_;
-
- // Acknowledgements and drops are tracked by adding the IDs for the
- // acknowledged or dropped items to the proper set. An invalidation may be
- // both dropped and acknowledged if it represents the recovery from a drop
- // event.
- std::set<int> dropped_;
- std::set<int> acknowledged_;
-};
-
-} // namespace syncer
-
-#endif // SYNC_TEST_MOCK_INVALIDATION_TRACKER_H_
« 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