| 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/macros.h" | 5 #include "base/macros.h" |
| 6 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 6 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
| 7 #include "chrome/browser/sync/test/integration/sync_test.h" | 7 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 8 #include "components/browser_sync/profile_sync_service.h" | 8 #include "components/browser_sync/profile_sync_service.h" |
| 9 #include "components/sync/base/model_type.h" | 9 #include "components/sync/base/model_type.h" |
| 10 #include "components/sync/base/sync_prefs.h" | 10 #include "components/sync/base/sync_prefs.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 return data_type_status_table.GetUnreadyErrorTypes().Has(type); | 49 return data_type_status_table.GetUnreadyErrorTypes().Has(type); |
| 50 } | 50 } |
| 51 | 51 |
| 52 // The current approach this test class takes is to examine the Directory and | 52 // The current approach this test class takes is to examine the Directory and |
| 53 // check for root nodes to see if a type is currently enabled. While this works | 53 // check for root nodes to see if a type is currently enabled. While this works |
| 54 // for things in the directory, it does not work for USS types. USS does not | 54 // for things in the directory, it does not work for USS types. USS does not |
| 55 // have any general data access mechanism, at least yet. Until that exists, | 55 // have any general data access mechanism, at least yet. Until that exists, |
| 56 // simply omit types that may be USS from these cases. | 56 // simply omit types that may be USS from these cases. |
| 57 ModelTypeSet UnifiedSyncServiceTypes() { | 57 ModelTypeSet UnifiedSyncServiceTypes() { |
| 58 ModelTypeSet set; | 58 ModelTypeSet set; |
| 59 if (FeatureList::IsEnabled(switches::kSyncUSSAutocomplete)) { |
| 60 set.Put(syncer::AUTOFILL); |
| 61 } |
| 59 if (FeatureList::IsEnabled(switches::kSyncUSSDeviceInfo)) { | 62 if (FeatureList::IsEnabled(switches::kSyncUSSDeviceInfo)) { |
| 60 set.Put(syncer::DEVICE_INFO); | 63 set.Put(syncer::DEVICE_INFO); |
| 61 } | 64 } |
| 62 // PRINTERS was the first USS type, and should precede all other USS types. | 65 // PRINTERS was the first USS type, and should precede all other USS types. |
| 63 // All new types should be USS. This logic is fragile to reordering ModelType. | 66 // All new types should be USS. This logic is fragile to reordering ModelType. |
| 64 for (int typeInt = syncer::PRINTERS; typeInt < syncer::FIRST_PROXY_TYPE; | 67 for (int typeInt = syncer::PRINTERS; typeInt < syncer::FIRST_PROXY_TYPE; |
| 65 typeInt++) { | 68 typeInt++) { |
| 66 set.Put(static_cast<ModelType>(typeInt)); | 69 set.Put(static_cast<ModelType>(typeInt)); |
| 67 } | 70 } |
| 68 return set; | 71 return set; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 211 |
| 209 // Lastly make sure that all the multi grouped times are all gone, since we | 212 // Lastly make sure that all the multi grouped times are all gone, since we |
| 210 // did not check these after disabling inside the above loop. | 213 // did not check these after disabling inside the above loop. |
| 211 for (ModelTypeSet::Iterator mgi = multi_grouped_types_.First(); mgi.Good(); | 214 for (ModelTypeSet::Iterator mgi = multi_grouped_types_.First(); mgi.Good(); |
| 212 mgi.Inc()) { | 215 mgi.Inc()) { |
| 213 VerifyExistence(user_share_, false, mgi.Get()); | 216 VerifyExistence(user_share_, false, mgi.Get()); |
| 214 } | 217 } |
| 215 } | 218 } |
| 216 | 219 |
| 217 } // namespace | 220 } // namespace |
| OLD | NEW |