| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/test/integration/migration_watcher.h" | 5 #include "chrome/browser/sync/test/integration/migration_watcher.h" |
| 6 | 6 |
| 7 #include "chrome/browser/sync/test/integration/migration_waiter.h" | 7 #include "chrome/browser/sync/test/integration/migration_waiter.h" |
| 8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
| 9 #include "components/browser_sync/browser/profile_sync_service.h" | 9 #include "components/browser_sync/profile_sync_service.h" |
| 10 | 10 |
| 11 MigrationWatcher::MigrationWatcher(ProfileSyncServiceHarness* harness) | 11 MigrationWatcher::MigrationWatcher(ProfileSyncServiceHarness* harness) |
| 12 : harness_(harness), migration_waiter_(NULL) { | 12 : harness_(harness), migration_waiter_(NULL) { |
| 13 browser_sync::BackendMigrator* migrator = | 13 browser_sync::BackendMigrator* migrator = |
| 14 harness_->service()->GetBackendMigratorForTest(); | 14 harness_->service()->GetBackendMigratorForTest(); |
| 15 // PSS must have a migrator after sync is setup and initial data type | 15 // PSS must have a migrator after sync is setup and initial data type |
| 16 // configuration is complete. | 16 // configuration is complete. |
| 17 migrator->AddMigrationObserver(this); | 17 migrator->AddMigrationObserver(this); |
| 18 } | 18 } |
| 19 | 19 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 void MigrationWatcher::set_migration_waiter(MigrationWaiter* waiter) { | 58 void MigrationWatcher::set_migration_waiter(MigrationWaiter* waiter) { |
| 59 DCHECK(!migration_waiter_); | 59 DCHECK(!migration_waiter_); |
| 60 migration_waiter_ = waiter; | 60 migration_waiter_ = waiter; |
| 61 } | 61 } |
| 62 | 62 |
| 63 void MigrationWatcher::clear_migration_waiter() { | 63 void MigrationWatcher::clear_migration_waiter() { |
| 64 DCHECK(migration_waiter_); | 64 DCHECK(migration_waiter_); |
| 65 migration_waiter_ = NULL; | 65 migration_waiter_ = NULL; |
| 66 } | 66 } |
| OLD | NEW |