Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: chrome/browser/sync/profile_sync_service_factory_unittest.cc

Issue 2968133002: Revert of [Sync] Enable UserEvents by default. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/sync/driver/sync_driver_switches.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
82 81
83 return datatypes; 82 return datatypes;
84 } 83 }
85 84
86 // Returns the number of default datatypes. 85 // Returns the number of default datatypes.
87 size_t DefaultDatatypesCount() { return DefaultDatatypes().size(); } 86 size_t DefaultDatatypesCount() { return DefaultDatatypes().size(); }
88 87
89 // Asserts that all the default datatypes are in |map|, except 88 // Asserts that all the default datatypes are in |map|, except
90 // for |exception_type|, which unless it is UNDEFINED, is asserted to 89 // for |exception_type|, which unless it is UNDEFINED, is asserted to
91 // not be in |map|. 90 // not be in |map|.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 syncer::ModelTypeSet disabled_types(syncer::AUTOFILL_PROFILE, 150 syncer::ModelTypeSet disabled_types(syncer::AUTOFILL_PROFILE,
152 syncer::BOOKMARKS); 151 syncer::BOOKMARKS);
153 SetDisabledTypes(disabled_types); 152 SetDisabledTypes(disabled_types);
154 ProfileSyncService* pss = ProfileSyncServiceFactory::GetForProfile(profile()); 153 ProfileSyncService* pss = ProfileSyncServiceFactory::GetForProfile(profile());
155 DataTypeController::StateMap controller_states; 154 DataTypeController::StateMap controller_states;
156 pss->GetDataTypeControllerStates(&controller_states); 155 pss->GetDataTypeControllerStates(&controller_states);
157 EXPECT_EQ(DefaultDatatypesCount() - disabled_types.Size(), 156 EXPECT_EQ(DefaultDatatypesCount() - disabled_types.Size(),
158 controller_states.size()); 157 controller_states.size());
159 CheckDefaultDatatypesInMapExcept(&controller_states, disabled_types); 158 CheckDefaultDatatypesInMapExcept(&controller_states, disabled_types);
160 } 159 }
OLDNEW
« no previous file with comments | « no previous file | components/sync/driver/sync_driver_switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698