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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "components/signin/core/browser/account_tracker_service.h" | 25 #include "components/signin/core/browser/account_tracker_service.h" |
26 #include "components/signin/core/browser/fake_signin_manager.h" | 26 #include "components/signin/core/browser/fake_signin_manager.h" |
27 #include "components/strings/grit/components_strings.h" | 27 #include "components/strings/grit/components_strings.h" |
28 #include "components/sync/base/pref_names.h" | 28 #include "components/sync/base/pref_names.h" |
29 #include "components/sync/driver/fake_data_type_controller.h" | 29 #include "components/sync/driver/fake_data_type_controller.h" |
30 #include "components/sync/driver/glue/sync_backend_host_mock.h" | 30 #include "components/sync/driver/glue/sync_backend_host_mock.h" |
31 #include "components/sync/driver/sync_api_component_factory_mock.h" | 31 #include "components/sync/driver/sync_api_component_factory_mock.h" |
32 #include "components/sync/driver/sync_driver_switches.h" | 32 #include "components/sync/driver/sync_driver_switches.h" |
33 #include "components/sync/driver/sync_service_observer.h" | 33 #include "components/sync/driver/sync_service_observer.h" |
34 #include "components/sync/driver/sync_util.h" | 34 #include "components/sync/driver/sync_util.h" |
35 #include "components/syncable_prefs/testing_pref_service_syncable.h" | 35 #include "components/sync_preferences/testing_pref_service_syncable.h" |
36 #include "components/version_info/version_info_values.h" | 36 #include "components/version_info/version_info_values.h" |
37 #include "google_apis/gaia/gaia_constants.h" | 37 #include "google_apis/gaia/gaia_constants.h" |
38 #include "testing/gmock/include/gmock/gmock.h" | 38 #include "testing/gmock/include/gmock/gmock.h" |
39 #include "testing/gtest/include/gtest/gtest.h" | 39 #include "testing/gtest/include/gtest/gtest.h" |
40 #include "ui/base/l10n/l10n_util.h" | 40 #include "ui/base/l10n/l10n_util.h" |
41 | 41 |
42 using syncer::SyncBackendHostMock; | 42 using syncer::SyncBackendHostMock; |
43 using testing::Return; | 43 using testing::Return; |
44 | 44 |
45 namespace browser_sync { | 45 namespace browser_sync { |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 { | 348 { |
349 return profile_sync_service_bundle_.signin_manager(); | 349 return profile_sync_service_bundle_.signin_manager(); |
350 } | 350 } |
351 | 351 |
352 ProfileOAuth2TokenService* auth_service() { | 352 ProfileOAuth2TokenService* auth_service() { |
353 return profile_sync_service_bundle_.auth_service(); | 353 return profile_sync_service_bundle_.auth_service(); |
354 } | 354 } |
355 | 355 |
356 ProfileSyncService* service() { return service_.get(); } | 356 ProfileSyncService* service() { return service_.get(); } |
357 | 357 |
358 syncable_prefs::TestingPrefServiceSyncable* prefs() { | 358 sync_preferences::TestingPrefServiceSyncable* prefs() { |
359 return profile_sync_service_bundle_.pref_service(); | 359 return profile_sync_service_bundle_.pref_service(); |
360 } | 360 } |
361 | 361 |
362 syncer::SyncApiComponentFactoryMock* component_factory() { | 362 syncer::SyncApiComponentFactoryMock* component_factory() { |
363 return component_factory_; | 363 return component_factory_; |
364 } | 364 } |
365 | 365 |
366 protected: | 366 protected: |
367 void PumpLoop() { | 367 void PumpLoop() { |
368 base::RunLoop run_loop; | 368 base::RunLoop run_loop; |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 // dereferenced in OnSyncCycleCompleted. The fix is to use find() to check if | 947 // dereferenced in OnSyncCycleCompleted. The fix is to use find() to check if |
948 // entry for sessions exists in map. | 948 // entry for sessions exists in map. |
949 TEST_F(ProfileSyncServiceTest, ValidPointersInDTCMap) { | 949 TEST_F(ProfileSyncServiceTest, ValidPointersInDTCMap) { |
950 CreateService(ProfileSyncService::AUTO_START); | 950 CreateService(ProfileSyncService::AUTO_START); |
951 service()->OnSessionRestoreComplete(); | 951 service()->OnSessionRestoreComplete(); |
952 service()->OnSyncCycleCompleted(); | 952 service()->OnSyncCycleCompleted(); |
953 } | 953 } |
954 | 954 |
955 } // namespace | 955 } // namespace |
956 } // namespace browser_sync | 956 } // namespace browser_sync |
OLD | NEW |