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

Unified Diff: sync/notifier/ack_handler.h

Issue 40303005: Add code for new invalidation local ack system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt at fixing win Created 7 years, 2 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/internal_api/public/base/invalidation.cc ('k') | sync/notifier/ack_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/ack_handler.h
diff --git a/sync/notifier/ack_handler.h b/sync/notifier/ack_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..f1fc16fa702d294e5a96bb3188de3af85f3dc809
--- /dev/null
+++ b/sync/notifier/ack_handler.h
@@ -0,0 +1,42 @@
+// Copyright 2013 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_NOTIFIER_ACK_HANDLER_H_
+#define SYNC_NOTIFIER_ACK_HANDLER_H_
+
+#include <vector>
+
+#include "sync/base/sync_export.h"
+
+namespace invalidation {
+class ObjectId;
+} // namespace invalidation
+
+namespace syncer {
+
+class AckHandle;
+
+// An interface for classes that keep track of invalidation acknowledgements.
+//
+// We don't expect to support more than one "real" implementation of AckHandler,
+// but this interface is very useful for testing and implementation hiding.
+class SYNC_EXPORT AckHandler {
+ public:
+ AckHandler();
+ virtual ~AckHandler() = 0;
+
+ // Record the local acknowledgement of an invalidation identified by |handle|.
+ virtual void Acknowledge(
+ const invalidation::ObjectId& id,
+ const AckHandle& handle) = 0;
+
+ // Record the drop of an invalidation identified by |handle|.
+ virtual void Drop(
+ const invalidation::ObjectId& id,
+ const AckHandle& handle) = 0;
+};
+
+} // namespace syncer
+
+#endif // SYNC_NOTIFIER_ACK_HANDLER_H_
« no previous file with comments | « sync/internal_api/public/base/invalidation.cc ('k') | sync/notifier/ack_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698