blob: dc8ef26c26982f9da0fbaa6339c11a676ec6e797 (
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
35
36
37
|
// Copyright (c) 2012 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.
//
// An InvalidationVersionTracker is an interface that handles getting
// and setting (persisting) max invalidation versions.
#ifndef SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
#define SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
#include <map>
#include "base/basictypes.h"
#include "sync/syncable/model_type.h"
namespace sync_notifier {
typedef std::map<syncable::ModelType, int64> InvalidationVersionMap;
class InvalidationStateTracker {
public:
InvalidationStateTracker() {}
virtual InvalidationVersionMap GetAllMaxVersions() const = 0;
// |max_version| should be strictly greater than any existing max
// version for |model_type|.
virtual void SetMaxVersion(syncable::ModelType model_type,
int64 max_version) = 0;
protected:
virtual ~InvalidationStateTracker() {}
};
} // namespace sync_notifier
#endif // SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_
|