| 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_waiter.h" | 5 #include "chrome/browser/sync/test/integration/migration_waiter.h" |
| 6 | 6 |
| 7 #include <string> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "chrome/browser/sync/test/integration/migration_watcher.h" | 10 #include "chrome/browser/sync/test/integration/migration_watcher.h" |
| 9 | 11 |
| 10 MigrationWaiter::MigrationWaiter(syncer::ModelTypeSet expected_types, | 12 MigrationWaiter::MigrationWaiter(syncer::ModelTypeSet expected_types, |
| 11 MigrationWatcher* watcher) | 13 MigrationWatcher* watcher) |
| 12 : watcher_(watcher), expected_types_(expected_types) { | 14 : watcher_(watcher), expected_types_(expected_types) { |
| 13 DCHECK(!expected_types_.Empty()); | 15 DCHECK(!expected_types_.Empty()); |
| 14 watcher_->set_migration_waiter(this); | 16 watcher_->set_migration_waiter(this); |
| 15 } | 17 } |
| 16 | 18 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 27 | 29 |
| 28 std::string MigrationWaiter::GetDebugMessage() const { | 30 std::string MigrationWaiter::GetDebugMessage() const { |
| 29 return "Waiting to migrate (" + ModelTypeSetToString(expected_types_) + | 31 return "Waiting to migrate (" + ModelTypeSetToString(expected_types_) + |
| 30 "); " + "Currently migrated: (" + | 32 "); " + "Currently migrated: (" + |
| 31 ModelTypeSetToString(watcher_->GetMigratedTypes()) + ")"; | 33 ModelTypeSetToString(watcher_->GetMigratedTypes()) + ")"; |
| 32 } | 34 } |
| 33 | 35 |
| 34 void MigrationWaiter::OnMigrationStateChange() { | 36 void MigrationWaiter::OnMigrationStateChange() { |
| 35 CheckExitCondition(); | 37 CheckExitCondition(); |
| 36 } | 38 } |
| OLD | NEW |