OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef COMPONENTS_SYNC_DRIVER_INVALIDATION_ADAPTER_H_ | |
6 #define COMPONENTS_SYNC_DRIVER_INVALIDATION_ADAPTER_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include <string> | |
11 | |
12 #include "components/invalidation/public/invalidation.h" | |
13 #include "components/sync/base/invalidation_interface.h" | |
14 | |
15 namespace browser_sync { | |
16 | |
17 // Wraps a syncer::Invalidation in the syncer::InvalidationInterface. | |
18 class InvalidationAdapter : public syncer::InvalidationInterface { | |
19 public: | |
20 explicit InvalidationAdapter(const syncer::Invalidation& invalidation); | |
21 ~InvalidationAdapter() override; | |
22 | |
23 // Implementation of InvalidationInterface. | |
24 bool IsUnknownVersion() const override; | |
25 const std::string& GetPayload() const override; | |
26 int64_t GetVersion() const override; | |
27 void Acknowledge() override; | |
28 void Drop() override; | |
29 | |
30 private: | |
31 syncer::Invalidation invalidation_; | |
32 }; | |
33 | |
34 } // namespace browser_sync | |
35 | |
36 #endif // COMPONENTS_SYNC_DRIVER_INVALIDATION_ADAPTER_H_ | |
OLD | NEW |