1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SYNC_NOTIFIER_ACK_HANDLER_H_
6 #define SYNC_NOTIFIER_ACK_HANDLER_H_
10 #include "sync/base/sync_export.h"
12 namespace invalidation {
14 } // namespace invalidation
20 // An interface for classes that keep track of invalidation acknowledgements.
22 // We don't expect to support more than one "real" implementation of AckHandler,
23 // but this interface is very useful for testing and implementation hiding.
24 class SYNC_EXPORT AckHandler {
27 virtual ~AckHandler() = 0;
29 // Record the local acknowledgement of an invalidation identified by |handle|.
30 virtual void Acknowledge(
31 const invalidation::ObjectId& id,
32 const AckHandle& handle) = 0;
34 // Record the drop of an invalidation identified by |handle|.
36 const invalidation::ObjectId& id,
37 const AckHandle& handle) = 0;
42 #endif // SYNC_NOTIFIER_ACK_HANDLER_H_