OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "sync/test/engine/mock_update_handler.h" |
| 6 |
| 7 #include "sync/internal_api/public/base/model_type.h" |
| 8 |
| 9 namespace syncer { |
| 10 |
| 11 MockUpdateHandler::MockUpdateHandler(ModelType type) { |
| 12 progress_marker_.set_data_type_id(GetSpecificsFieldNumberFromModelType(type)); |
| 13 const std::string& token_str = |
| 14 std::string("Mock token: ") + std::string(ModelTypeToString(type)); |
| 15 progress_marker_.set_token(token_str); |
| 16 } |
| 17 |
| 18 MockUpdateHandler::~MockUpdateHandler() {} |
| 19 |
| 20 void MockUpdateHandler::GetDownloadProgress( |
| 21 sync_pb::DataTypeProgressMarker* progress_marker) const { |
| 22 progress_marker->CopyFrom(progress_marker_); |
| 23 } |
| 24 |
| 25 void MockUpdateHandler::ProcessGetUpdatesResponse( |
| 26 const sync_pb::DataTypeProgressMarker& progress_marker, |
| 27 const SyncEntityList& applicable_updates, |
| 28 sessions::StatusController* status) { |
| 29 progress_marker_.CopyFrom(progress_marker); |
| 30 } |
| 31 |
| 32 void MockUpdateHandler::ApplyUpdates(sessions::StatusController* status) {} |
| 33 |
| 34 void MockUpdateHandler::PassiveApplyUpdates( |
| 35 sessions::StatusController* status) {} |
| 36 |
| 37 } // namespace syncer |
OLD | NEW |