OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "sync/test/engine/mock_update_handler.h" | 5 #include "sync/test/engine/mock_update_handler.h" |
6 | 6 |
7 #include "sync/internal_api/public/base/model_type.h" | 7 #include "sync/internal_api/public/base/model_type.h" |
8 | 8 |
9 namespace syncer { | 9 namespace syncer { |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 void MockUpdateHandler::GetDownloadProgress( | 22 void MockUpdateHandler::GetDownloadProgress( |
23 sync_pb::DataTypeProgressMarker* progress_marker) const { | 23 sync_pb::DataTypeProgressMarker* progress_marker) const { |
24 progress_marker->CopyFrom(progress_marker_); | 24 progress_marker->CopyFrom(progress_marker_); |
25 } | 25 } |
26 | 26 |
27 void MockUpdateHandler::GetDataTypeContext( | 27 void MockUpdateHandler::GetDataTypeContext( |
28 sync_pb::DataTypeContext* context) const { | 28 sync_pb::DataTypeContext* context) const { |
29 context->Clear(); | 29 context->Clear(); |
30 } | 30 } |
31 | 31 |
32 void MockUpdateHandler::ProcessGetUpdatesResponse( | 32 SyncerError MockUpdateHandler::ProcessGetUpdatesResponse( |
33 const sync_pb::DataTypeProgressMarker& progress_marker, | 33 const sync_pb::DataTypeProgressMarker& progress_marker, |
34 const sync_pb::DataTypeContext& mutated_context, | 34 const sync_pb::DataTypeContext& mutated_context, |
35 const SyncEntityList& applicable_updates, | 35 const SyncEntityList& applicable_updates, |
36 sessions::StatusController* status) { | 36 sessions::StatusController* status) { |
37 progress_marker_.CopyFrom(progress_marker); | 37 progress_marker_.CopyFrom(progress_marker); |
| 38 return syncer::SYNCER_OK; |
38 } | 39 } |
39 | 40 |
40 void MockUpdateHandler::ApplyUpdates(sessions::StatusController* status) { | 41 void MockUpdateHandler::ApplyUpdates(sessions::StatusController* status) { |
41 apply_updates_count_++; | 42 apply_updates_count_++; |
42 } | 43 } |
43 | 44 |
44 void MockUpdateHandler::PassiveApplyUpdates( | 45 void MockUpdateHandler::PassiveApplyUpdates( |
45 sessions::StatusController* status) { | 46 sessions::StatusController* status) { |
46 passive_apply_updates_count_++; | 47 passive_apply_updates_count_++; |
47 } | 48 } |
48 | 49 |
49 int MockUpdateHandler::GetApplyUpdatesCount() { | 50 int MockUpdateHandler::GetApplyUpdatesCount() { |
50 return apply_updates_count_; | 51 return apply_updates_count_; |
51 } | 52 } |
52 | 53 |
53 int MockUpdateHandler::GetPassiveApplyUpdatesCount() { | 54 int MockUpdateHandler::GetPassiveApplyUpdatesCount() { |
54 return passive_apply_updates_count_; | 55 return passive_apply_updates_count_; |
55 } | 56 } |
56 | 57 |
57 } // namespace syncer | 58 } // namespace syncer |
OLD | NEW |