OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "sync/test/null_directory_change_delegate.h" | 7 #include "components/sync/test/null_directory_change_delegate.h" |
8 | 8 |
9 namespace syncer { | 9 namespace syncer { |
10 namespace syncable { | 10 namespace syncable { |
11 | 11 |
12 NullDirectoryChangeDelegate::~NullDirectoryChangeDelegate() {} | 12 NullDirectoryChangeDelegate::~NullDirectoryChangeDelegate() {} |
13 | 13 |
14 void NullDirectoryChangeDelegate::HandleCalculateChangesChangeEventFromSyncApi( | 14 void NullDirectoryChangeDelegate::HandleCalculateChangesChangeEventFromSyncApi( |
15 const ImmutableWriteTransactionInfo& write_transaction_info, | 15 const ImmutableWriteTransactionInfo& write_transaction_info, |
16 BaseTransaction* trans, | 16 BaseTransaction* trans, |
17 std::vector<int64_t>* entries_changed) { | 17 std::vector<int64_t>* entries_changed) { |
18 for (EntryKernelMutationMap::const_iterator it = | 18 for (EntryKernelMutationMap::const_iterator it = |
19 write_transaction_info.Get().mutations.Get().begin(); | 19 write_transaction_info.Get().mutations.Get().begin(); |
20 it != write_transaction_info.Get().mutations.Get().end(); ++it) { | 20 it != write_transaction_info.Get().mutations.Get().end(); ++it) { |
21 entries_changed->push_back(it->first); | 21 entries_changed->push_back(it->first); |
22 } | 22 } |
23 } | 23 } |
24 | 24 |
25 void NullDirectoryChangeDelegate::HandleCalculateChangesChangeEventFromSyncer( | 25 void NullDirectoryChangeDelegate::HandleCalculateChangesChangeEventFromSyncer( |
26 const ImmutableWriteTransactionInfo& write_transaction_info, | 26 const ImmutableWriteTransactionInfo& write_transaction_info, |
27 BaseTransaction* trans, | 27 BaseTransaction* trans, |
28 std::vector<int64_t>* entries_changed) { | 28 std::vector<int64_t>* entries_changed) { |
29 for (EntryKernelMutationMap::const_iterator it = | 29 for (EntryKernelMutationMap::const_iterator it = |
30 write_transaction_info.Get().mutations.Get().begin(); | 30 write_transaction_info.Get().mutations.Get().begin(); |
31 it != write_transaction_info.Get().mutations.Get().end(); ++it) { | 31 it != write_transaction_info.Get().mutations.Get().end(); ++it) { |
32 entries_changed->push_back(it->first); | 32 entries_changed->push_back(it->first); |
33 } | 33 } |
34 } | 34 } |
35 | 35 |
36 ModelTypeSet NullDirectoryChangeDelegate::HandleTransactionEndingChangeEvent( | 36 ModelTypeSet NullDirectoryChangeDelegate::HandleTransactionEndingChangeEvent( |
37 const ImmutableWriteTransactionInfo& write_transaction_info, | 37 const ImmutableWriteTransactionInfo& write_transaction_info, |
38 BaseTransaction* trans) { | 38 BaseTransaction* trans) { |
39 return ModelTypeSet(); | 39 return ModelTypeSet(); |
40 } | 40 } |
41 | 41 |
42 void NullDirectoryChangeDelegate::HandleTransactionCompleteChangeEvent( | 42 void NullDirectoryChangeDelegate::HandleTransactionCompleteChangeEvent( |
43 ModelTypeSet models_with_changes) {} | 43 ModelTypeSet models_with_changes) {} |
44 | 44 |
45 } // namespace syncable | 45 } // namespace syncable |
46 } // namespace syncer | 46 } // namespace syncer |
OLD | NEW |