| 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_model_type_processor.h" | 5 #include "components/sync/test/engine/mock_model_type_processor.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/sha1.h" | 11 #include "base/sha1.h" |
| 12 #include "components/sync/engine/commit_queue.h" | 12 #include "components/sync/engine/commit_queue.h" |
| 13 | 13 |
| 14 namespace syncer_v2 { | 14 namespace syncer { |
| 15 | 15 |
| 16 MockModelTypeProcessor::MockModelTypeProcessor() : is_synchronous_(true) {} | 16 MockModelTypeProcessor::MockModelTypeProcessor() : is_synchronous_(true) {} |
| 17 | 17 |
| 18 MockModelTypeProcessor::~MockModelTypeProcessor() {} | 18 MockModelTypeProcessor::~MockModelTypeProcessor() {} |
| 19 | 19 |
| 20 void MockModelTypeProcessor::ConnectSync( | 20 void MockModelTypeProcessor::ConnectSync( |
| 21 std::unique_ptr<CommitQueue> commit_queue) { | 21 std::unique_ptr<CommitQueue> commit_queue) { |
| 22 NOTREACHED(); | 22 NOTREACHED(); |
| 23 } | 23 } |
| 24 | 24 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 const std::string& tag_hash) const { | 266 const std::string& tag_hash) const { |
| 267 DCHECK(HasServerAssignedId(tag_hash)); | 267 DCHECK(HasServerAssignedId(tag_hash)); |
| 268 return assigned_ids_.find(tag_hash)->second; | 268 return assigned_ids_.find(tag_hash)->second; |
| 269 } | 269 } |
| 270 | 270 |
| 271 void MockModelTypeProcessor::SetServerAssignedId(const std::string& tag_hash, | 271 void MockModelTypeProcessor::SetServerAssignedId(const std::string& tag_hash, |
| 272 const std::string& id) { | 272 const std::string& id) { |
| 273 assigned_ids_[tag_hash] = id; | 273 assigned_ids_[tag_hash] = id; |
| 274 } | 274 } |
| 275 | 275 |
| 276 } // namespace syncer_v2 | 276 } // namespace syncer |
| OLD | NEW |