blob: 0f008149fa08233d634038762ed88ebf8d4928a2 (
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
38
39
40
41
|
// 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.
#include "sync/test/trackable_mock_invalidation.h"
#include "sync/test/mock_invalidation_tracker.h"
namespace syncer {
TrackableMockInvalidation::TrackableMockInvalidation(
bool is_unknown_version,
int64 version,
const std::string& payload,
MockInvalidationTracker* tracker,
int tracking_id)
: MockInvalidation(is_unknown_version, version, payload),
tracker_(tracker),
tracking_id_(tracking_id) {
}
TrackableMockInvalidation::~TrackableMockInvalidation() {
}
void TrackableMockInvalidation::Acknowledge() {
if (tracker_) {
tracker_->Acknowledge(tracking_id_);
}
}
void TrackableMockInvalidation::Drop() {
if (tracker_) {
tracker_->Drop(tracking_id_);
}
}
int TrackableMockInvalidation::GetTrackingId() {
return tracking_id_;
}
} // namespace syncer
|