| 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 "components/sync/test/engine/mock_update_handler.h" | 5 #include "components/sync/test/engine/mock_update_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 namespace syncer { | 9 namespace syncer { |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 sync_pb::DataTypeContext* context) const { | 31 sync_pb::DataTypeContext* context) const { |
| 32 context->Clear(); | 32 context->Clear(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 SyncerError MockUpdateHandler::ProcessGetUpdatesResponse( | 35 SyncerError MockUpdateHandler::ProcessGetUpdatesResponse( |
| 36 const sync_pb::DataTypeProgressMarker& progress_marker, | 36 const sync_pb::DataTypeProgressMarker& progress_marker, |
| 37 const sync_pb::DataTypeContext& mutated_context, | 37 const sync_pb::DataTypeContext& mutated_context, |
| 38 const SyncEntityList& applicable_updates, | 38 const SyncEntityList& applicable_updates, |
| 39 StatusController* status) { | 39 StatusController* status) { |
| 40 progress_marker_.CopyFrom(progress_marker); | 40 progress_marker_.CopyFrom(progress_marker); |
| 41 return syncer::SYNCER_OK; | 41 return SYNCER_OK; |
| 42 } | 42 } |
| 43 | 43 |
| 44 void MockUpdateHandler::ApplyUpdates(StatusController* status) { | 44 void MockUpdateHandler::ApplyUpdates(StatusController* status) { |
| 45 apply_updates_count_++; | 45 apply_updates_count_++; |
| 46 } | 46 } |
| 47 | 47 |
| 48 void MockUpdateHandler::PassiveApplyUpdates(StatusController* status) { | 48 void MockUpdateHandler::PassiveApplyUpdates(StatusController* status) { |
| 49 passive_apply_updates_count_++; | 49 passive_apply_updates_count_++; |
| 50 } | 50 } |
| 51 | 51 |
| 52 int MockUpdateHandler::GetApplyUpdatesCount() { | 52 int MockUpdateHandler::GetApplyUpdatesCount() { |
| 53 return apply_updates_count_; | 53 return apply_updates_count_; |
| 54 } | 54 } |
| 55 | 55 |
| 56 int MockUpdateHandler::GetPassiveApplyUpdatesCount() { | 56 int MockUpdateHandler::GetPassiveApplyUpdatesCount() { |
| 57 return passive_apply_updates_count_; | 57 return passive_apply_updates_count_; |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace syncer | 60 } // namespace syncer |
| OLD | NEW |