| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_ACK_HANDLER_H_ | 5 #ifndef COMPONENTS_INVALIDATION_ACK_HANDLER_H_ |
| 6 #define SYNC_INTERNAL_API_PUBLIC_BASE_ACK_HANDLER_H_ | 6 #define COMPONENTS_INVALIDATION_ACK_HANDLER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "sync/base/sync_export.h" | 10 #include "components/invalidation/invalidation_export.h" |
| 11 | 11 |
| 12 namespace invalidation { | 12 namespace invalidation { |
| 13 class ObjectId; | 13 class ObjectId; |
| 14 } // namespace invalidation | 14 } // namespace invalidation |
| 15 | 15 |
| 16 namespace syncer { | 16 namespace syncer { |
| 17 | 17 |
| 18 class AckHandle; | 18 class AckHandle; |
| 19 | 19 |
| 20 // An interface for classes that keep track of invalidation acknowledgements. | 20 // An interface for classes that keep track of invalidation acknowledgements. |
| 21 // | 21 // |
| 22 // We don't expect to support more than one "real" implementation of AckHandler, | 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. | 23 // but this interface is very useful for testing and implementation hiding. |
| 24 class SYNC_EXPORT AckHandler { | 24 class INVALIDATION_EXPORT AckHandler { |
| 25 public: | 25 public: |
| 26 AckHandler(); | 26 AckHandler(); |
| 27 virtual ~AckHandler() = 0; | 27 virtual ~AckHandler() = 0; |
| 28 | 28 |
| 29 // Record the local acknowledgement of an invalidation identified by |handle|. | 29 // Record the local acknowledgement of an invalidation identified by |handle|. |
| 30 virtual void Acknowledge( | 30 virtual void Acknowledge(const invalidation::ObjectId& id, |
| 31 const invalidation::ObjectId& id, | 31 const AckHandle& handle) = 0; |
| 32 const AckHandle& handle) = 0; | |
| 33 | 32 |
| 34 // Record the drop of an invalidation identified by |handle|. | 33 // Record the drop of an invalidation identified by |handle|. |
| 35 virtual void Drop( | 34 virtual void Drop(const invalidation::ObjectId& id, |
| 36 const invalidation::ObjectId& id, | 35 const AckHandle& handle) = 0; |
| 37 const AckHandle& handle) = 0; | |
| 38 }; | 36 }; |
| 39 | 37 |
| 40 } // namespace syncer | 38 } // namespace syncer |
| 41 | 39 |
| 42 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_ACK_HANDLER_H_ | 40 #endif // COMPONENTS_INVALIDATION_ACK_HANDLER_H_ |
| OLD | NEW |