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