OLD | NEW |
| (Empty) |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "sync/api/fake_sync_change_processor.h" | |
6 | |
7 #include "sync/api/sync_change.h" | |
8 #include "sync/api/sync_data.h" | |
9 | |
10 namespace syncer { | |
11 | |
12 FakeSyncChangeProcessor::FakeSyncChangeProcessor() {} | |
13 | |
14 FakeSyncChangeProcessor::~FakeSyncChangeProcessor() {} | |
15 | |
16 syncer::SyncError FakeSyncChangeProcessor::ProcessSyncChanges( | |
17 const tracked_objects::Location& from_here, | |
18 const syncer::SyncChangeList& change_list) { | |
19 changes_.insert( | |
20 changes_.end(), change_list.begin(), change_list.end()); | |
21 return syncer::SyncError(); | |
22 } | |
23 | |
24 syncer::SyncDataList FakeSyncChangeProcessor::GetAllSyncData( | |
25 syncer::ModelType type) const { | |
26 return data_; | |
27 } | |
28 | |
29 syncer::SyncError FakeSyncChangeProcessor::UpdateDataTypeContext( | |
30 ModelType type, | |
31 ContextRefreshStatus refresh_status, | |
32 const std::string& context) { | |
33 context_ = context; | |
34 return syncer::SyncError(); | |
35 } | |
36 | |
37 const syncer::SyncChangeList& FakeSyncChangeProcessor::changes() const { | |
38 return changes_; | |
39 } | |
40 | |
41 syncer::SyncChangeList& FakeSyncChangeProcessor::changes() { | |
42 return changes_; | |
43 } | |
44 | |
45 const syncer::SyncDataList& FakeSyncChangeProcessor::data() const { | |
46 return data_; | |
47 } | |
48 | |
49 syncer::SyncDataList& FakeSyncChangeProcessor::data() { | |
50 return data_; | |
51 } | |
52 | |
53 const std::string& FakeSyncChangeProcessor::context() const { | |
54 return context_; | |
55 } | |
56 | |
57 std::string& FakeSyncChangeProcessor::context() { | |
58 return context_; | |
59 } | |
60 | |
61 } // namespace syncer | |
OLD | NEW |