| 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 #include "components/sync/base/model_type.h" | |
| 10 | |
| 11 namespace syncer { | 9 namespace syncer { |
| 12 | 10 |
| 13 MockUpdateHandler::MockUpdateHandler(ModelType type) | 11 MockUpdateHandler::MockUpdateHandler(ModelType type) |
| 14 : apply_updates_count_(0), passive_apply_updates_count_(0) { | 12 : apply_updates_count_(0), passive_apply_updates_count_(0) { |
| 15 progress_marker_.set_data_type_id(GetSpecificsFieldNumberFromModelType(type)); | 13 progress_marker_.set_data_type_id(GetSpecificsFieldNumberFromModelType(type)); |
| 16 const std::string& token_str = | 14 const std::string& token_str = |
| 17 std::string("Mock token: ") + std::string(ModelTypeToString(type)); | 15 std::string("Mock token: ") + std::string(ModelTypeToString(type)); |
| 18 progress_marker_.set_token(token_str); | 16 progress_marker_.set_token(token_str); |
| 19 } | 17 } |
| 20 | 18 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 51 |
| 54 int MockUpdateHandler::GetApplyUpdatesCount() { | 52 int MockUpdateHandler::GetApplyUpdatesCount() { |
| 55 return apply_updates_count_; | 53 return apply_updates_count_; |
| 56 } | 54 } |
| 57 | 55 |
| 58 int MockUpdateHandler::GetPassiveApplyUpdatesCount() { | 56 int MockUpdateHandler::GetPassiveApplyUpdatesCount() { |
| 59 return passive_apply_updates_count_; | 57 return passive_apply_updates_count_; |
| 60 } | 58 } |
| 61 | 59 |
| 62 } // namespace syncer | 60 } // namespace syncer |
| OLD | NEW |