| 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 "components/sync/api/fake_sync_change_processor.h" | |
| 6 | |
| 7 #include "components/sync/api/sync_change.h" | |
| 8 #include "components/sync/api/sync_data.h" | |
| 9 | |
| 10 namespace syncer { | |
| 11 | |
| 12 FakeSyncChangeProcessor::FakeSyncChangeProcessor() {} | |
| 13 | |
| 14 FakeSyncChangeProcessor::~FakeSyncChangeProcessor() {} | |
| 15 | |
| 16 SyncError FakeSyncChangeProcessor::ProcessSyncChanges( | |
| 17 const tracked_objects::Location& from_here, | |
| 18 const SyncChangeList& change_list) { | |
| 19 changes_.insert(changes_.end(), change_list.begin(), change_list.end()); | |
| 20 return SyncError(); | |
| 21 } | |
| 22 | |
| 23 SyncDataList FakeSyncChangeProcessor::GetAllSyncData(ModelType type) const { | |
| 24 return data_; | |
| 25 } | |
| 26 | |
| 27 SyncError FakeSyncChangeProcessor::UpdateDataTypeContext( | |
| 28 ModelType type, | |
| 29 ContextRefreshStatus refresh_status, | |
| 30 const std::string& context) { | |
| 31 context_ = context; | |
| 32 return SyncError(); | |
| 33 } | |
| 34 | |
| 35 void FakeSyncChangeProcessor::AddLocalChangeObserver( | |
| 36 LocalChangeObserver* observer) {} | |
| 37 | |
| 38 void FakeSyncChangeProcessor::RemoveLocalChangeObserver( | |
| 39 LocalChangeObserver* observer) {} | |
| 40 | |
| 41 const SyncChangeList& FakeSyncChangeProcessor::changes() const { | |
| 42 return changes_; | |
| 43 } | |
| 44 | |
| 45 SyncChangeList& FakeSyncChangeProcessor::changes() { | |
| 46 return changes_; | |
| 47 } | |
| 48 | |
| 49 const SyncDataList& FakeSyncChangeProcessor::data() const { | |
| 50 return data_; | |
| 51 } | |
| 52 | |
| 53 SyncDataList& FakeSyncChangeProcessor::data() { | |
| 54 return data_; | |
| 55 } | |
| 56 | |
| 57 const std::string& FakeSyncChangeProcessor::context() const { | |
| 58 return context_; | |
| 59 } | |
| 60 | |
| 61 std::string& FakeSyncChangeProcessor::context() { | |
| 62 return context_; | |
| 63 } | |
| 64 | |
| 65 } // namespace syncer | |
| OLD | NEW |