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

Unified Diff: components/sync/device_info/device_info_data_type_controller_unittest.cc

Issue 2289143003: [Sync] Convert DTCs to be not RefCounted and NonThreadSafe. (Closed)
Patch Set: Rebase. Created 4 years, 3 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: components/sync/device_info/device_info_data_type_controller_unittest.cc
diff --git a/components/sync/device_info/device_info_data_type_controller_unittest.cc b/components/sync/device_info/device_info_data_type_controller_unittest.cc
index 58da55d76d9d38aeae9bd5fcb5c8361d7666f937..b4c21d8e3aa45530da125dc84db35dad74701d51 100644
--- a/components/sync/device_info/device_info_data_type_controller_unittest.cc
+++ b/components/sync/device_info/device_info_data_type_controller_unittest.cc
@@ -32,9 +32,8 @@ class DeviceInfoDataTypeControllerTest : public testing::Test {
"cache_guid", "Wayne Gretzky's Hacking Box", "Chromium 10k",
"Chrome 10k", sync_pb::SyncEnums_DeviceType_TYPE_LINUX, "device_id"));
- controller_ = new DeviceInfoDataTypeController(
- base::ThreadTaskRunnerHandle::Get(), base::Closure(), &sync_client_,
- local_device_.get());
+ controller_.reset(new DeviceInfoDataTypeController(
+ base::Closure(), &sync_client_, local_device_.get()));
load_finished_ = false;
last_type_ = syncer::UNSPECIFIED;
@@ -52,7 +51,7 @@ class DeviceInfoDataTypeControllerTest : public testing::Test {
weak_ptr_factory_.GetWeakPtr()));
}
- void OnLoadFinished(syncer::ModelType type, syncer::SyncError error) {
+ void OnLoadFinished(syncer::ModelType type, const syncer::SyncError& error) {
load_finished_ = true;
last_type_ = type;
last_error_ = error;
@@ -79,7 +78,7 @@ class DeviceInfoDataTypeControllerTest : public testing::Test {
}
protected:
- scoped_refptr<DeviceInfoDataTypeController> controller_;
+ std::unique_ptr<DeviceInfoDataTypeController> controller_;
std::unique_ptr<LocalDeviceInfoProviderMock> local_device_;
bool load_finished_;

Powered by Google App Engine
This is Rietveld 408576698