summaryrefslogtreecommitdiffstats
path: root/sync/test/null_directory_change_delegate.cc
blob: e9793ef3003a6ce722def0b7a5e2cf602fb11c66 (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
42
43
44
45
46
// 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.

#include <stdint.h>

#include "sync/test/null_directory_change_delegate.h"

namespace syncer {
namespace syncable {

NullDirectoryChangeDelegate::~NullDirectoryChangeDelegate() {}

void NullDirectoryChangeDelegate::HandleCalculateChangesChangeEventFromSyncApi(
    const ImmutableWriteTransactionInfo& write_transaction_info,
    BaseTransaction* trans,
    std::vector<int64_t>* entries_changed) {
  for (EntryKernelMutationMap::const_iterator it =
          write_transaction_info.Get().mutations.Get().begin();
      it != write_transaction_info.Get().mutations.Get().end(); ++it) {
    entries_changed->push_back(it->first);
  }
}

void NullDirectoryChangeDelegate::HandleCalculateChangesChangeEventFromSyncer(
    const ImmutableWriteTransactionInfo& write_transaction_info,
    BaseTransaction* trans,
    std::vector<int64_t>* entries_changed) {
  for (EntryKernelMutationMap::const_iterator it =
          write_transaction_info.Get().mutations.Get().begin();
      it != write_transaction_info.Get().mutations.Get().end(); ++it) {
    entries_changed->push_back(it->first);
  }
}

ModelTypeSet NullDirectoryChangeDelegate::HandleTransactionEndingChangeEvent(
    const ImmutableWriteTransactionInfo& write_transaction_info,
    BaseTransaction* trans) {
  return ModelTypeSet();
}

void NullDirectoryChangeDelegate::HandleTransactionCompleteChangeEvent(
    ModelTypeSet models_with_changes) {}

}  // namespace syncable
}  // namespace syncer