OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "chrome/browser/sync/profile_sync_service_factory.h" | 5 #include "chrome/browser/sync/profile_sync_service_factory.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> |
10 | 11 |
11 #include "base/command_line.h" | 12 #include "base/command_line.h" |
12 #include "build/build_config.h" | 13 #include "build/build_config.h" |
13 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
14 #include "components/browser_sync/browser_sync_switches.h" | 15 #include "components/browser_sync/browser_sync_switches.h" |
15 #include "components/browser_sync/profile_sync_service.h" | 16 #include "components/browser_sync/profile_sync_service.h" |
16 #include "components/sync/base/model_type.h" | 17 #include "components/sync/base/model_type.h" |
17 #include "components/sync/driver/data_type_controller.h" | 18 #include "components/sync/driver/data_type_controller.h" |
18 #include "content/public/test/test_browser_thread_bundle.h" | 19 #include "content/public/test/test_browser_thread_bundle.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 23 matching lines...) Expand all Loading... |
43 #endif | 44 #endif |
44 #if defined(OS_CHROMEOS) | 45 #if defined(OS_CHROMEOS) |
45 datatypes.push_back(syncer::ARC_PACKAGE); | 46 datatypes.push_back(syncer::ARC_PACKAGE); |
46 #endif | 47 #endif |
47 datatypes.push_back(syncer::EXTENSIONS); | 48 datatypes.push_back(syncer::EXTENSIONS); |
48 datatypes.push_back(syncer::EXTENSION_SETTINGS); | 49 datatypes.push_back(syncer::EXTENSION_SETTINGS); |
49 datatypes.push_back(syncer::SEARCH_ENGINES); | 50 datatypes.push_back(syncer::SEARCH_ENGINES); |
50 datatypes.push_back(syncer::THEMES); | 51 datatypes.push_back(syncer::THEMES); |
51 datatypes.push_back(syncer::SUPERVISED_USERS); | 52 datatypes.push_back(syncer::SUPERVISED_USERS); |
52 datatypes.push_back(syncer::SUPERVISED_USER_SHARED_SETTINGS); | 53 datatypes.push_back(syncer::SUPERVISED_USER_SHARED_SETTINGS); |
53 #endif // !OS_ANDROID | 54 #endif // !OS_ANDROID |
54 | 55 |
55 // Common types. | 56 // Common types. |
56 datatypes.push_back(syncer::AUTOFILL); | 57 datatypes.push_back(syncer::AUTOFILL); |
57 datatypes.push_back(syncer::AUTOFILL_PROFILE); | 58 datatypes.push_back(syncer::AUTOFILL_PROFILE); |
58 datatypes.push_back(syncer::AUTOFILL_WALLET_DATA); | 59 datatypes.push_back(syncer::AUTOFILL_WALLET_DATA); |
59 datatypes.push_back(syncer::AUTOFILL_WALLET_METADATA); | 60 datatypes.push_back(syncer::AUTOFILL_WALLET_METADATA); |
60 datatypes.push_back(syncer::BOOKMARKS); | 61 datatypes.push_back(syncer::BOOKMARKS); |
61 datatypes.push_back(syncer::DEVICE_INFO); | 62 datatypes.push_back(syncer::DEVICE_INFO); |
62 datatypes.push_back(syncer::FAVICON_TRACKING); | 63 datatypes.push_back(syncer::FAVICON_TRACKING); |
63 datatypes.push_back(syncer::FAVICON_IMAGES); | 64 datatypes.push_back(syncer::FAVICON_IMAGES); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 syncer::ModelTypeSet disabled_types(syncer::AUTOFILL_PROFILE, | 143 syncer::ModelTypeSet disabled_types(syncer::AUTOFILL_PROFILE, |
143 syncer::BOOKMARKS); | 144 syncer::BOOKMARKS); |
144 SetDisabledTypes(disabled_types); | 145 SetDisabledTypes(disabled_types); |
145 ProfileSyncService* pss = ProfileSyncServiceFactory::GetForProfile(profile()); | 146 ProfileSyncService* pss = ProfileSyncServiceFactory::GetForProfile(profile()); |
146 DataTypeController::StateMap controller_states; | 147 DataTypeController::StateMap controller_states; |
147 pss->GetDataTypeControllerStates(&controller_states); | 148 pss->GetDataTypeControllerStates(&controller_states); |
148 EXPECT_EQ(DefaultDatatypesCount() - disabled_types.Size(), | 149 EXPECT_EQ(DefaultDatatypesCount() - disabled_types.Size(), |
149 controller_states.size()); | 150 controller_states.size()); |
150 CheckDefaultDatatypesInMapExcept(&controller_states, disabled_types); | 151 CheckDefaultDatatypesInMapExcept(&controller_states, disabled_types); |
151 } | 152 } |
OLD | NEW |