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

Side by Side Diff: components/sync_driver/backend_migrator_unittest.cc

Issue 1907683003: Convert //components/sync_driver from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix, address feedback Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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 "components/sync_driver/backend_migrator.h" 5 #include "components/sync_driver/backend_migrator.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/tracked_objects.h" 9 #include "base/tracked_objects.h"
10 #include "components/sync_driver/data_type_manager_mock.h" 10 #include "components/sync_driver/data_type_manager_mock.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void RemovePreferredType(syncer::ModelType type) { 91 void RemovePreferredType(syncer::ModelType type) {
92 preferred_types_.Remove(type); 92 preferred_types_.Remove(type);
93 } 93 }
94 94
95 private: 95 private:
96 base::MessageLoop message_loop_; 96 base::MessageLoop message_loop_;
97 syncer::ModelTypeSet preferred_types_; 97 syncer::ModelTypeSet preferred_types_;
98 sync_driver::FakeSyncService service_; 98 sync_driver::FakeSyncService service_;
99 NiceMock<DataTypeManagerMock> manager_; 99 NiceMock<DataTypeManagerMock> manager_;
100 syncer::TestUserShare test_user_share_; 100 syncer::TestUserShare test_user_share_;
101 scoped_ptr<BackendMigrator> migrator_; 101 std::unique_ptr<BackendMigrator> migrator_;
102 }; 102 };
103 103
104 class MockMigrationObserver : public MigrationObserver { 104 class MockMigrationObserver : public MigrationObserver {
105 public: 105 public:
106 virtual ~MockMigrationObserver() {} 106 virtual ~MockMigrationObserver() {}
107 107
108 MOCK_METHOD0(OnMigrationStateChange, void()); 108 MOCK_METHOD0(OnMigrationStateChange, void());
109 }; 109 };
110 110
111 // Test that in the normal case a migration does transition through each state 111 // Test that in the normal case a migration does transition through each state
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 EXPECT_CALL( 323 EXPECT_CALL(
324 *manager(), 324 *manager(),
325 PurgeForMigration(_, syncer::CONFIGURE_REASON_MIGRATION)).Times(1); 325 PurgeForMigration(_, syncer::CONFIGURE_REASON_MIGRATION)).Times(1);
326 migrator()->MigrateTypes(to_migrate); 326 migrator()->MigrateTypes(to_migrate);
327 SetUnsyncedTypes(syncer::ModelTypeSet()); 327 SetUnsyncedTypes(syncer::ModelTypeSet());
328 SendConfigureDone(DataTypeManager::ABORTED, syncer::ModelTypeSet()); 328 SendConfigureDone(DataTypeManager::ABORTED, syncer::ModelTypeSet());
329 EXPECT_EQ(BackendMigrator::IDLE, migrator()->state()); 329 EXPECT_EQ(BackendMigrator::IDLE, migrator()->state());
330 } 330 }
331 331
332 }; // namespace browser_sync 332 }; // namespace browser_sync
OLDNEW
« no previous file with comments | « components/sync_driver/backend_data_type_configurer.h ('k') | components/sync_driver/data_type_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698