| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/memory/ptr_util.h" | 6 #include "base/memory/ptr_util.h" |
| 7 #include "base/threading/thread_task_runner_handle.h" | 7 #include "base/threading/thread_task_runner_handle.h" |
| 8 #include "chrome/browser/sync/chrome_sync_client.h" | 8 #include "chrome/browser/sync/chrome_sync_client.h" |
| 9 #include "chrome/browser/sync/profile_sync_service_factory.h" | 9 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 10 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 10 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
| 11 #include "chrome/browser/sync/test/integration/single_client_status_change_check
er.h" | 11 #include "chrome/browser/sync/test/integration/single_client_status_change_check
er.h" |
| 12 #include "chrome/browser/sync/test/integration/status_change_checker.h" | 12 #include "chrome/browser/sync/test/integration/status_change_checker.h" |
| 13 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" | 13 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
| 14 #include "chrome/browser/sync/test/integration/sync_test.h" | 14 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 15 #include "components/browser_sync/profile_sync_components_factory_impl.h" | 15 #include "components/browser_sync/profile_sync_components_factory_impl.h" |
| 16 #include "components/browser_sync/profile_sync_service.h" | 16 #include "components/browser_sync/profile_sync_service.h" |
| 17 #include "components/sync/api/fake_model_type_service.h" | 17 #include "components/sync/model/fake_model_type_service.h" |
| 18 | 18 |
| 19 using browser_sync::ChromeSyncClient; | 19 using browser_sync::ChromeSyncClient; |
| 20 using browser_sync::ProfileSyncComponentsFactoryImpl; | 20 using browser_sync::ProfileSyncComponentsFactoryImpl; |
| 21 using syncer::ConflictResolution; | 21 using syncer::ConflictResolution; |
| 22 using syncer::FakeModelTypeService; | 22 using syncer::FakeModelTypeService; |
| 23 using syncer::ModelTypeService; | 23 using syncer::ModelTypeService; |
| 24 using syncer::SharedModelTypeProcessor; | 24 using syncer::SharedModelTypeProcessor; |
| 25 | 25 |
| 26 const char kKey1[] = "key1"; | 26 const char kKey1[] = "key1"; |
| 27 const char kKey2[] = "key2"; | 27 const char kKey2[] = "key2"; |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 model2->SetServiceError(syncer::SyncError::DATATYPE_ERROR); | 319 model2->SetServiceError(syncer::SyncError::DATATYPE_ERROR); |
| 320 // Write an item on model 1 to trigger a GetUpdates in model 2. | 320 // Write an item on model 1 to trigger a GetUpdates in model 2. |
| 321 model1->WriteItem(kKey1, kValue2); | 321 model1->WriteItem(kKey1, kValue2); |
| 322 | 322 |
| 323 // The type should stop syncing but keep tracking metadata. | 323 // The type should stop syncing but keep tracking metadata. |
| 324 ASSERT_TRUE(PrefsNotRunningChecker(GetSyncService(1)).Wait()); | 324 ASSERT_TRUE(PrefsNotRunningChecker(GetSyncService(1)).Wait()); |
| 325 ASSERT_EQ(1U, model2->db().metadata_count()); | 325 ASSERT_EQ(1U, model2->db().metadata_count()); |
| 326 model2->WriteItem(kKey2, kValue2); | 326 model2->WriteItem(kKey2, kValue2); |
| 327 ASSERT_EQ(2U, model2->db().metadata_count()); | 327 ASSERT_EQ(2U, model2->db().metadata_count()); |
| 328 } | 328 } |
| OLD | NEW |