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/driver/fake_data_type_controller.h" | 5 #include "components/sync/driver/fake_data_type_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "components/sync/api/data_type_error_handler_impl.h" | 10 #include "components/sync/model/data_type_error_handler_impl.h" |
11 #include "components/sync/api/sync_merge_result.h" | 11 #include "components/sync/model/sync_merge_result.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace syncer { | 15 namespace syncer { |
16 | 16 |
17 FakeDataTypeController::FakeDataTypeController(ModelType type) | 17 FakeDataTypeController::FakeDataTypeController(ModelType type) |
18 : DirectoryDataTypeController(type, base::Closure(), nullptr), | 18 : DirectoryDataTypeController(type, base::Closure(), nullptr), |
19 state_(NOT_RUNNING), | 19 state_(NOT_RUNNING), |
20 model_load_delayed_(false), | 20 model_load_delayed_(false), |
21 ready_for_start_(true), | 21 ready_for_start_(true), |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 std::unique_ptr<DataTypeErrorHandler> | 155 std::unique_ptr<DataTypeErrorHandler> |
156 FakeDataTypeController::CreateErrorHandler() { | 156 FakeDataTypeController::CreateErrorHandler() { |
157 DCHECK(CalledOnValidThread()); | 157 DCHECK(CalledOnValidThread()); |
158 return base::MakeUnique<DataTypeErrorHandlerImpl>( | 158 return base::MakeUnique<DataTypeErrorHandlerImpl>( |
159 base::ThreadTaskRunnerHandle::Get(), base::Closure(), | 159 base::ThreadTaskRunnerHandle::Get(), base::Closure(), |
160 base::Bind(model_load_callback_, type())); | 160 base::Bind(model_load_callback_, type())); |
161 } | 161 } |
162 | 162 |
163 } // namespace syncer | 163 } // namespace syncer |
OLD | NEW |