Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: chrome/browser/sync/test/integration/migration_test.cc

Issue 2767893002: Remove ScopedVector from chrome/browser/. (Closed)
Patch Set: Address comments from zea@ Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test/integration/migration_test.cc
diff --git a/chrome/browser/sync/test/integration/migration_test.cc b/chrome/browser/sync/test/integration/migration_test.cc
index 2c468f560e0060282c04678fbeb2f8e881e69015..848b93b6853c1cd32e5e6ba04d5432e2f0cf37b2 100644
--- a/chrome/browser/sync/test/integration/migration_test.cc
+++ b/chrome/browser/sync/test/integration/migration_test.cc
@@ -2,9 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <memory>
+#include <vector>
+
#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
+#include "base/memory/ptr_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/bookmarks_helper.h"
#include "chrome/browser/sync/test/integration/migration_waiter.h"
@@ -81,8 +84,8 @@ class MigrationTest : public SyncTest {
return false;
for (int i = 0; i < num_clients(); ++i) {
- MigrationWatcher* watcher = new MigrationWatcher(GetClient(i));
- migration_watchers_.push_back(watcher);
+ migration_watchers_.push_back(
+ base::MakeUnique<MigrationWatcher>(GetClient(i)));
}
return true;
}
@@ -160,7 +163,7 @@ class MigrationTest : public SyncTest {
void AwaitMigration(syncer::ModelTypeSet migrate_types) {
for (int i = 0; i < num_clients(); ++i) {
ASSERT_TRUE(
- MigrationWaiter(migrate_types, migration_watchers_[i]).Wait());
+ MigrationWaiter(migrate_types, migration_watchers_[i].get()).Wait());
}
}
@@ -216,7 +219,7 @@ class MigrationTest : public SyncTest {
private:
// Used to keep track of the migration progress for each sync client.
- ScopedVector<MigrationWatcher> migration_watchers_;
+ std::vector<std::unique_ptr<MigrationWatcher>> migration_watchers_;
DISALLOW_COPY_AND_ASSIGN(MigrationTest);
};
« no previous file with comments | « chrome/browser/sync/test/integration/apps_helper.cc ('k') | chrome/browser/sync/test/integration/passwords_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698