blob: 3377f5430773ad34d7a0816b005d201d6d033008 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_SYNC_DRIVER_INVALIDATION_ADAPTER_H_
#define COMPONENTS_SYNC_DRIVER_INVALIDATION_ADAPTER_H_
#include <string>
#include "components/invalidation/public/invalidation.h"
#include "sync/internal_api/public/base/invalidation_interface.h"
namespace browser_sync {
// Wraps a syncer::Invalidation in the syncer::InvalidationInterface.
class InvalidationAdapter : public syncer::InvalidationInterface {
public:
explicit InvalidationAdapter(const syncer::Invalidation& invalidation);
~InvalidationAdapter() override;
// Implementation of InvalidationInterface.
bool IsUnknownVersion() const override;
const std::string& GetPayload() const override;
int64 GetVersion() const override;
void Acknowledge() override;
void Drop() override;
private:
syncer::Invalidation invalidation_;
};
} // namespace browser_sync
#endif // COMPONENTS_SYNC_DRIVER_INVALIDATION_ADAPTER_H_
|