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