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

Side by Side Diff: components/search_engines/search_engine_data_type_controller_unittest.cc

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 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/search_engines/search_engine_data_type_controller.h" 5 #include "components/search_engines/search_engine_data_type_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 protected: 65 protected:
66 void PreloadTemplateURLService() { 66 void PreloadTemplateURLService() {
67 template_url_service_->set_disable_load(false); 67 template_url_service_->set_disable_load(false);
68 template_url_service_->Load(); 68 template_url_service_->Load();
69 } 69 }
70 70
71 void SetStartExpectations() { 71 void SetStartExpectations() {
72 search_engine_dtc_->SetGenericChangeProcessorFactoryForTest( 72 search_engine_dtc_->SetGenericChangeProcessorFactoryForTest(
73 base::WrapUnique<sync_driver::GenericChangeProcessorFactory>( 73 base::WrapUnique<sync_driver::GenericChangeProcessorFactory>(
74 new sync_driver::FakeGenericChangeProcessorFactory( 74 new sync_driver::FakeGenericChangeProcessorFactory(
75 base::WrapUnique(new sync_driver::FakeGenericChangeProcessor( 75 base::MakeUnique<sync_driver::FakeGenericChangeProcessor>(
76 syncer::SEARCH_ENGINES, this))))); 76 syncer::SEARCH_ENGINES, this))));
77 EXPECT_CALL(model_load_callback_, Run(_, _)); 77 EXPECT_CALL(model_load_callback_, Run(_, _));
78 } 78 }
79 79
80 void Start() { 80 void Start() {
81 search_engine_dtc_->LoadModels( 81 search_engine_dtc_->LoadModels(
82 base::Bind(&sync_driver::ModelLoadCallbackMock::Run, 82 base::Bind(&sync_driver::ModelLoadCallbackMock::Run,
83 base::Unretained(&model_load_callback_))); 83 base::Unretained(&model_load_callback_)));
84 search_engine_dtc_->StartAssociating( 84 search_engine_dtc_->StartAssociating(
85 base::Bind(&sync_driver::StartCallbackMock::Run, 85 base::Bind(&sync_driver::StartCallbackMock::Run,
86 base::Unretained(&start_callback_))); 86 base::Unretained(&start_callback_)));
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 EXPECT_FALSE(syncable_service_.syncing()); 182 EXPECT_FALSE(syncable_service_.syncing());
183 search_engine_dtc_->Stop(); 183 search_engine_dtc_->Stop();
184 EXPECT_EQ(NULL, search_engine_dtc_->GetSubscriptionForTesting()); 184 EXPECT_EQ(NULL, search_engine_dtc_->GetSubscriptionForTesting());
185 EXPECT_EQ(sync_driver::DataTypeController::NOT_RUNNING, 185 EXPECT_EQ(sync_driver::DataTypeController::NOT_RUNNING,
186 search_engine_dtc_->state()); 186 search_engine_dtc_->state());
187 EXPECT_FALSE(syncable_service_.syncing()); 187 EXPECT_FALSE(syncable_service_.syncing());
188 } 188 }
189 189
190 } // namespace 190 } // namespace
191 } // namespace browser_sync 191 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698