OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/api/mock_model_type_store.h" | 5 #include "components/sync/api/mock_model_type_store.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 | 15 |
16 namespace syncer { | 16 namespace syncer_v2 { |
17 | 17 |
18 MockModelTypeStore::MockModelTypeStore() {} | 18 MockModelTypeStore::MockModelTypeStore() {} |
19 | 19 |
20 MockModelTypeStore::~MockModelTypeStore() {} | 20 MockModelTypeStore::~MockModelTypeStore() {} |
21 | 21 |
22 void MockModelTypeStore::ReadData(const IdList& id_list, | 22 void MockModelTypeStore::ReadData(const IdList& id_list, |
23 const ReadDataCallback& callback) { | 23 const ReadDataCallback& callback) { |
24 if (!read_data_handler_.is_null()) { | 24 if (!read_data_handler_.is_null()) { |
25 read_data_handler_.Run(id_list, callback); | 25 read_data_handler_.Run(id_list, callback); |
26 } else { | 26 } else { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 void MockModelTypeStore::RegisterDeleteMetadataHandler( | 154 void MockModelTypeStore::RegisterDeleteMetadataHandler( |
155 const DeleteRecordSignature& handler) { | 155 const DeleteRecordSignature& handler) { |
156 delete_metadata_handler_ = handler; | 156 delete_metadata_handler_ = handler; |
157 } | 157 } |
158 | 158 |
159 void MockModelTypeStore::RegisterDeleteGlobalMetadataHandler( | 159 void MockModelTypeStore::RegisterDeleteGlobalMetadataHandler( |
160 const DeleteGlobalMetadataSignature& handler) { | 160 const DeleteGlobalMetadataSignature& handler) { |
161 delete_global_metadata_handler_ = handler; | 161 delete_global_metadata_handler_ = handler; |
162 } | 162 } |
163 | 163 |
164 } // namespace syncer | 164 } // namespace syncer_v2 |
OLD | NEW |