| 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/profile_sync_service.h" | 5 #include "components/browser_sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| 11 #include "components/browser_sync/profile_sync_test_util.h" | 11 #include "components/browser_sync/profile_sync_test_util.h" |
| 12 #include "components/prefs/pref_service.h" | 12 #include "components/prefs/pref_service.h" |
| 13 #include "components/signin/core/browser/account_tracker_service.h" | 13 #include "components/signin/core/browser/account_tracker_service.h" |
| 14 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" | 14 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
| 15 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 15 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 16 #include "components/signin/core/browser/signin_manager.h" | 16 #include "components/signin/core/browser/signin_manager.h" |
| 17 #include "components/signin/core/common/signin_pref_names.h" | 17 #include "components/signin/core/common/signin_pref_names.h" |
| 18 #include "components/sync/base/pref_names.h" | 18 #include "components/sync/base/pref_names.h" |
| 19 #include "components/sync/driver/data_type_manager_mock.h" | 19 #include "components/sync/driver/data_type_manager_mock.h" |
| 20 #include "components/sync/driver/fake_data_type_controller.h" | 20 #include "components/sync/driver/fake_data_type_controller.h" |
| 21 #include "components/sync/driver/glue/sync_backend_host_mock.h" | 21 #include "components/sync/driver/glue/sync_backend_host_mock.h" |
| 22 #include "components/sync/driver/sync_api_component_factory_mock.h" | 22 #include "components/sync/driver/sync_api_component_factory_mock.h" |
| 23 #include "components/sync/driver/sync_service_observer.h" | 23 #include "components/sync/driver/sync_service_observer.h" |
| 24 #include "components/syncable_prefs/pref_service_syncable.h" | 24 #include "components/sync_preferences/pref_service_syncable.h" |
| 25 #include "google_apis/gaia/gaia_auth_consumer.h" | 25 #include "google_apis/gaia/gaia_auth_consumer.h" |
| 26 #include "google_apis/gaia/gaia_constants.h" | 26 #include "google_apis/gaia/gaia_constants.h" |
| 27 #include "net/url_request/url_request_test_util.h" | 27 #include "net/url_request/url_request_test_util.h" |
| 28 #include "testing/gmock/include/gmock/gmock.h" | 28 #include "testing/gmock/include/gmock/gmock.h" |
| 29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 30 | 30 |
| 31 using syncer::DataTypeManager; | 31 using syncer::DataTypeManager; |
| 32 using syncer::DataTypeManagerMock; | 32 using syncer::DataTypeManagerMock; |
| 33 using syncer::SyncBackendHostMock; | 33 using syncer::SyncBackendHostMock; |
| 34 using testing::_; | 34 using testing::_; |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); | 467 EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); |
| 468 sync_service_->Initialize(); | 468 sync_service_->Initialize(); |
| 469 | 469 |
| 470 auto sync_blocker = sync_service_->GetSetupInProgressHandle(); | 470 auto sync_blocker = sync_service_->GetSetupInProgressHandle(); |
| 471 IssueTestTokens(account_id); | 471 IssueTestTokens(account_id); |
| 472 sync_blocker.reset(); | 472 sync_blocker.reset(); |
| 473 EXPECT_FALSE(sync_service_->IsSyncActive()); | 473 EXPECT_FALSE(sync_service_->IsSyncActive()); |
| 474 } | 474 } |
| 475 | 475 |
| 476 } // namespace browser_sync | 476 } // namespace browser_sync |
| OLD | NEW |