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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/callback.h" | 6 #include "base/callback.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "chrome/browser/invalidation/fake_invalidation_service.h" | 17 #include "chrome/browser/invalidation/fake_invalidation_service.h" |
18 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" | 18 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" |
19 #include "chrome/browser/signin/account_tracker_service_factory.h" | 19 #include "chrome/browser/signin/account_tracker_service_factory.h" |
20 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" | 20 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" |
21 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 21 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
22 #include "chrome/browser/signin/signin_manager_factory.h" | 22 #include "chrome/browser/signin/signin_manager_factory.h" |
23 #include "chrome/browser/sync/chrome_sync_client.h" | 23 #include "chrome/browser/sync/chrome_sync_client.h" |
24 #include "chrome/browser/sync/glue/sync_backend_host_mock.h" | |
25 #include "chrome/browser/sync/profile_sync_service.h" | 24 #include "chrome/browser/sync/profile_sync_service.h" |
26 #include "chrome/browser/sync/profile_sync_test_util.h" | 25 #include "chrome/browser/sync/profile_sync_test_util.h" |
27 #include "chrome/common/channel_info.h" | 26 #include "chrome/common/channel_info.h" |
28 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
29 #include "chrome/common/pref_names.h" | 28 #include "chrome/common/pref_names.h" |
30 #include "chrome/test/base/testing_browser_process.h" | 29 #include "chrome/test/base/testing_browser_process.h" |
31 #include "chrome/test/base/testing_profile.h" | 30 #include "chrome/test/base/testing_profile.h" |
32 #include "chrome/test/base/testing_profile_manager.h" | 31 #include "chrome/test/base/testing_profile_manager.h" |
33 #include "components/browser_sync/common/browser_sync_switches.h" | 32 #include "components/browser_sync/common/browser_sync_switches.h" |
34 #include "components/invalidation/impl/profile_invalidation_provider.h" | 33 #include "components/invalidation/impl/profile_invalidation_provider.h" |
35 #include "components/invalidation/public/invalidation_service.h" | 34 #include "components/invalidation/public/invalidation_service.h" |
36 #include "components/signin/core/browser/account_tracker_service.h" | 35 #include "components/signin/core/browser/account_tracker_service.h" |
37 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" | 36 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
38 #include "components/signin/core/browser/signin_manager.h" | 37 #include "components/signin/core/browser/signin_manager.h" |
39 #include "components/signin/core/browser/signin_manager.h" | 38 #include "components/signin/core/browser/signin_manager.h" |
40 #include "components/strings/grit/components_strings.h" | 39 #include "components/strings/grit/components_strings.h" |
41 #include "components/sync_driver/data_type_manager.h" | 40 #include "components/sync_driver/data_type_manager.h" |
42 #include "components/sync_driver/data_type_manager_observer.h" | 41 #include "components/sync_driver/data_type_manager_observer.h" |
43 #include "components/sync_driver/fake_data_type_controller.h" | 42 #include "components/sync_driver/fake_data_type_controller.h" |
| 43 #include "components/sync_driver/glue/sync_backend_host_mock.h" |
44 #include "components/sync_driver/pref_names.h" | 44 #include "components/sync_driver/pref_names.h" |
45 #include "components/sync_driver/signin_manager_wrapper.h" | 45 #include "components/sync_driver/signin_manager_wrapper.h" |
46 #include "components/sync_driver/sync_api_component_factory_mock.h" | 46 #include "components/sync_driver/sync_api_component_factory_mock.h" |
47 #include "components/sync_driver/sync_driver_switches.h" | 47 #include "components/sync_driver/sync_driver_switches.h" |
48 #include "components/sync_driver/sync_prefs.h" | 48 #include "components/sync_driver/sync_prefs.h" |
49 #include "components/sync_driver/sync_service_observer.h" | 49 #include "components/sync_driver/sync_service_observer.h" |
50 #include "components/sync_driver/sync_util.h" | 50 #include "components/sync_driver/sync_util.h" |
51 #include "components/syncable_prefs/testing_pref_service_syncable.h" | 51 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
52 #include "components/version_info/version_info_values.h" | 52 #include "components/version_info/version_info_values.h" |
53 #include "content/public/test/test_browser_thread_bundle.h" | 53 #include "content/public/test/test_browser_thread_bundle.h" |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 InitializeForNthSync(); | 1055 InitializeForNthSync(); |
1056 | 1056 |
1057 syncer::SyncProtocolError client_cmd; | 1057 syncer::SyncProtocolError client_cmd; |
1058 client_cmd.action = syncer::RESET_LOCAL_SYNC_DATA; | 1058 client_cmd.action = syncer::RESET_LOCAL_SYNC_DATA; |
1059 service()->OnActionableError(client_cmd); | 1059 service()->OnActionableError(client_cmd); |
1060 EXPECT_EQ(ProfileSyncService::SYNC, service()->backend_mode()); | 1060 EXPECT_EQ(ProfileSyncService::SYNC, service()->backend_mode()); |
1061 } | 1061 } |
1062 | 1062 |
1063 } // namespace | 1063 } // namespace |
1064 } // namespace browser_sync | 1064 } // namespace browser_sync |
OLD | NEW |