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 <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 datatypes.push_back(syncer::FAVICON_IMAGES); | 71 datatypes.push_back(syncer::FAVICON_IMAGES); |
72 datatypes.push_back(syncer::HISTORY_DELETE_DIRECTIVES); | 72 datatypes.push_back(syncer::HISTORY_DELETE_DIRECTIVES); |
73 datatypes.push_back(syncer::PASSWORDS); | 73 datatypes.push_back(syncer::PASSWORDS); |
74 datatypes.push_back(syncer::PREFERENCES); | 74 datatypes.push_back(syncer::PREFERENCES); |
75 datatypes.push_back(syncer::PRIORITY_PREFERENCES); | 75 datatypes.push_back(syncer::PRIORITY_PREFERENCES); |
76 datatypes.push_back(syncer::SESSIONS); | 76 datatypes.push_back(syncer::SESSIONS); |
77 datatypes.push_back(syncer::PROXY_TABS); | 77 datatypes.push_back(syncer::PROXY_TABS); |
78 datatypes.push_back(syncer::SUPERVISED_USER_SETTINGS); | 78 datatypes.push_back(syncer::SUPERVISED_USER_SETTINGS); |
79 datatypes.push_back(syncer::SUPERVISED_USER_WHITELISTS); | 79 datatypes.push_back(syncer::SUPERVISED_USER_WHITELISTS); |
80 datatypes.push_back(syncer::TYPED_URLS); | 80 datatypes.push_back(syncer::TYPED_URLS); |
| 81 datatypes.push_back(syncer::USER_EVENTS); |
81 | 82 |
82 return datatypes; | 83 return datatypes; |
83 } | 84 } |
84 | 85 |
85 // Returns the number of default datatypes. | 86 // Returns the number of default datatypes. |
86 size_t DefaultDatatypesCount() { return DefaultDatatypes().size(); } | 87 size_t DefaultDatatypesCount() { return DefaultDatatypes().size(); } |
87 | 88 |
88 // Asserts that all the default datatypes are in |map|, except | 89 // Asserts that all the default datatypes are in |map|, except |
89 // for |exception_type|, which unless it is UNDEFINED, is asserted to | 90 // for |exception_type|, which unless it is UNDEFINED, is asserted to |
90 // not be in |map|. | 91 // not be in |map|. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 syncer::ModelTypeSet disabled_types(syncer::AUTOFILL_PROFILE, | 151 syncer::ModelTypeSet disabled_types(syncer::AUTOFILL_PROFILE, |
151 syncer::BOOKMARKS); | 152 syncer::BOOKMARKS); |
152 SetDisabledTypes(disabled_types); | 153 SetDisabledTypes(disabled_types); |
153 ProfileSyncService* pss = ProfileSyncServiceFactory::GetForProfile(profile()); | 154 ProfileSyncService* pss = ProfileSyncServiceFactory::GetForProfile(profile()); |
154 DataTypeController::StateMap controller_states; | 155 DataTypeController::StateMap controller_states; |
155 pss->GetDataTypeControllerStates(&controller_states); | 156 pss->GetDataTypeControllerStates(&controller_states); |
156 EXPECT_EQ(DefaultDatatypesCount() - disabled_types.Size(), | 157 EXPECT_EQ(DefaultDatatypesCount() - disabled_types.Size(), |
157 controller_states.size()); | 158 controller_states.size()); |
158 CheckDefaultDatatypesInMapExcept(&controller_states, disabled_types); | 159 CheckDefaultDatatypesInMapExcept(&controller_states, disabled_types); |
159 } | 160 } |
OLD | NEW |