| 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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.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 "sync/internal_api/public/base/model_type.h" | 8 #include "sync/internal_api/public/base/model_type.h" |
| 9 #include "sync/internal_api/public/read_node.h" | 9 #include "sync/internal_api/public/read_node.h" |
| 10 #include "sync/internal_api/public/read_transaction.h" | 10 #include "sync/internal_api/public/read_transaction.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Make sure all top-level nodes exist first. | 85 // Make sure all top-level nodes exist first. |
| 86 for (syncer::ModelTypeSet::Iterator it = registered_types.First(); | 86 for (syncer::ModelTypeSet::Iterator it = registered_types.First(); |
| 87 it.Good(); it.Inc()) { | 87 it.Good(); it.Inc()) { |
| 88 if (!syncer::ProxyTypes().Has(it.Get())) { | 88 if (!syncer::ProxyTypes().Has(it.Get())) { |
| 89 ASSERT_TRUE(DoesTopLevelNodeExist(user_share, it.Get())); | 89 ASSERT_TRUE(DoesTopLevelNodeExist(user_share, it.Get())); |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 | 92 |
| 93 for (syncer::ModelTypeSet::Iterator it = registered_types.First(); | 93 for (syncer::ModelTypeSet::Iterator it = registered_types.First(); |
| 94 it.Good(); it.Inc()) { | 94 it.Good(); it.Inc()) { |
| 95 // MANAGED_USERS and MANAGED_USER_SETTINGS are always synced. | 95 // SUPERVISED_USERS and SUPERVISED_USER_SHARED_SETTINGS are always synced. |
| 96 if (it.Get() == syncer::MANAGED_USERS || | 96 if (it.Get() == syncer::SUPERVISED_USERS || |
| 97 it.Get() == syncer::MANAGED_USER_SHARED_SETTINGS || | 97 it.Get() == syncer::SUPERVISED_USER_SHARED_SETTINGS || |
| 98 it.Get() == syncer::SYNCED_NOTIFICATIONS || | 98 it.Get() == syncer::SYNCED_NOTIFICATIONS || |
| 99 it.Get() == syncer::SYNCED_NOTIFICATION_APP_INFO) | 99 it.Get() == syncer::SYNCED_NOTIFICATION_APP_INFO) |
| 100 continue; | 100 continue; |
| 101 | 101 |
| 102 ASSERT_TRUE(GetClient(0)->DisableSyncForDatatype(it.Get())); | 102 ASSERT_TRUE(GetClient(0)->DisableSyncForDatatype(it.Get())); |
| 103 | 103 |
| 104 // AUTOFILL_PROFILE is lumped together with AUTOFILL. | 104 // AUTOFILL_PROFILE is lumped together with AUTOFILL. |
| 105 // SESSIONS is lumped together with PROXY_TABS and TYPED_URLS. | 105 // SESSIONS is lumped together with PROXY_TABS and TYPED_URLS. |
| 106 // HISTORY_DELETE_DIRECTIVES is lumped together with TYPED_URLS. | 106 // HISTORY_DELETE_DIRECTIVES is lumped together with TYPED_URLS. |
| 107 // PRIORITY_PREFERENCES is lumped together with PREFERENCES. | 107 // PRIORITY_PREFERENCES is lumped together with PREFERENCES. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 136 ASSERT_EQ(GetClient(0)->IsTypePreferred(syncer::TYPED_URLS), | 136 ASSERT_EQ(GetClient(0)->IsTypePreferred(syncer::TYPED_URLS), |
| 137 DoesTopLevelNodeExist(user_share, syncer::SESSIONS)); | 137 DoesTopLevelNodeExist(user_share, syncer::SESSIONS)); |
| 138 } else if (it.Get() == syncer::PREFERENCES) { | 138 } else if (it.Get() == syncer::PREFERENCES) { |
| 139 ASSERT_FALSE(DoesTopLevelNodeExist(user_share, | 139 ASSERT_FALSE(DoesTopLevelNodeExist(user_share, |
| 140 syncer::PRIORITY_PREFERENCES)); | 140 syncer::PRIORITY_PREFERENCES)); |
| 141 } | 141 } |
| 142 } | 142 } |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace | 145 } // namespace |
| OLD | NEW |