cros: Update enable-dev UI.
[chromium-blink-merge.git] / components / invalidation / ack_handler.h
blob0a2f642bb77e166a7e98a4990bae94c323081a46
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_INVALIDATION_ACK_HANDLER_H_
6 #define COMPONENTS_INVALIDATION_ACK_HANDLER_H_
8 #include <vector>
10 #include "components/invalidation/invalidation_export.h"
12 namespace invalidation {
13 class ObjectId;
14 } // namespace invalidation
16 namespace syncer {
18 class AckHandle;
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 INVALIDATION_EXPORT AckHandler {
25 public:
26 AckHandler();
27 virtual ~AckHandler() = 0;
29 // Record the local acknowledgement of an invalidation identified by |handle|.
30 virtual void Acknowledge(const invalidation::ObjectId& id,
31 const AckHandle& handle) = 0;
33 // Record the drop of an invalidation identified by |handle|.
34 virtual void Drop(const invalidation::ObjectId& id,
35 const AckHandle& handle) = 0;
38 } // namespace syncer
40 #endif // COMPONENTS_INVALIDATION_ACK_HANDLER_H_