| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser_sync/browser/abstract_profile_sync_service_test.h" | 5 #include "components/browser_sync/abstract_profile_sync_service_test.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
| 15 #include "components/browser_sync/browser/test_http_bridge_factory.h" | 15 #include "components/browser_sync/test_http_bridge_factory.h" |
| 16 #include "components/browser_sync/browser/test_profile_sync_service.h" | 16 #include "components/browser_sync/test_profile_sync_service.h" |
| 17 #include "components/sync/core/test/sync_manager_factory_for_profile_sync_test.h
" | 17 #include "components/sync/core/test/sync_manager_factory_for_profile_sync_test.h
" |
| 18 #include "components/sync/core/test/test_internal_components_factory.h" | 18 #include "components/sync/core/test/test_internal_components_factory.h" |
| 19 #include "components/sync/core/test/test_user_share.h" | 19 #include "components/sync/core/test/test_user_share.h" |
| 20 #include "components/sync/driver/glue/sync_backend_host_core.h" | 20 #include "components/sync/driver/glue/sync_backend_host_core.h" |
| 21 #include "components/sync/driver/sync_api_component_factory_mock.h" | 21 #include "components/sync/driver/sync_api_component_factory_mock.h" |
| 22 #include "components/sync/protocol/sync.pb.h" | 22 #include "components/sync/protocol/sync.pb.h" |
| 23 #include "google_apis/gaia/gaia_constants.h" | 23 #include "google_apis/gaia/gaia_constants.h" |
| 24 | 24 |
| 25 using syncer::ModelType; | 25 using syncer::ModelType; |
| 26 using testing::_; | 26 using testing::_; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 base::Bind(&AbstractProfileSyncServiceTest::sync_service, | 212 base::Bind(&AbstractProfileSyncServiceTest::sync_service, |
| 213 base::Unretained(this))); | 213 base::Unretained(this))); |
| 214 } | 214 } |
| 215 | 215 |
| 216 CreateRootHelper::CreateRootHelper(AbstractProfileSyncServiceTest* test, | 216 CreateRootHelper::CreateRootHelper(AbstractProfileSyncServiceTest* test, |
| 217 ModelType model_type) | 217 ModelType model_type) |
| 218 : callback_(base::Bind(&CreateRootHelper::CreateRootCallback, | 218 : callback_(base::Bind(&CreateRootHelper::CreateRootCallback, |
| 219 base::Unretained(this))), | 219 base::Unretained(this))), |
| 220 test_(test), | 220 test_(test), |
| 221 model_type_(model_type), | 221 model_type_(model_type), |
| 222 success_(false) { | 222 success_(false) {} |
| 223 } | |
| 224 | 223 |
| 225 CreateRootHelper::~CreateRootHelper() { | 224 CreateRootHelper::~CreateRootHelper() {} |
| 226 } | |
| 227 | 225 |
| 228 const base::Closure& CreateRootHelper::callback() const { | 226 const base::Closure& CreateRootHelper::callback() const { |
| 229 return callback_; | 227 return callback_; |
| 230 } | 228 } |
| 231 | 229 |
| 232 bool CreateRootHelper::success() { | 230 bool CreateRootHelper::success() { |
| 233 return success_; | 231 return success_; |
| 234 } | 232 } |
| 235 | 233 |
| 236 void CreateRootHelper::CreateRootCallback() { | 234 void CreateRootHelper::CreateRootCallback() { |
| 237 success_ = test_->CreateRoot(model_type_); | 235 success_ = test_->CreateRoot(model_type_); |
| 238 } | 236 } |
| OLD | NEW |