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

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

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 12 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 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 "components/sync_driver/ui_data_type_controller.h" 5 #include "components/sync_driver/ui_data_type_controller.h"
6 6
7 #include <utility>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/location.h" 10 #include "base/location.h"
9 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
10 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
11 #include "base/thread_task_runner_handle.h" 13 #include "base/thread_task_runner_handle.h"
12 #include "base/tracked_objects.h" 14 #include "base/tracked_objects.h"
13 #include "components/sync_driver/data_type_controller_mock.h" 15 #include "components/sync_driver/data_type_controller_mock.h"
14 #include "components/sync_driver/fake_generic_change_processor.h" 16 #include "components/sync_driver/fake_generic_change_processor.h"
15 #include "components/sync_driver/fake_sync_client.h" 17 #include "components/sync_driver/fake_sync_client.h"
16 #include "sync/api/fake_syncable_service.h" 18 #include "sync/api/fake_syncable_service.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 preference_dtc_ = NULL; 57 preference_dtc_ = NULL;
56 PumpLoop(); 58 PumpLoop();
57 } 59 }
58 60
59 protected: 61 protected:
60 void SetStartExpectations() { 62 void SetStartExpectations() {
61 scoped_ptr<FakeGenericChangeProcessor> p( 63 scoped_ptr<FakeGenericChangeProcessor> p(
62 new FakeGenericChangeProcessor(type_, this)); 64 new FakeGenericChangeProcessor(type_, this));
63 change_processor_ = p.get(); 65 change_processor_ = p.get();
64 scoped_ptr<GenericChangeProcessorFactory> f( 66 scoped_ptr<GenericChangeProcessorFactory> f(
65 new FakeGenericChangeProcessorFactory(p.Pass())); 67 new FakeGenericChangeProcessorFactory(std::move(p)));
66 preference_dtc_->SetGenericChangeProcessorFactoryForTest(f.Pass()); 68 preference_dtc_->SetGenericChangeProcessorFactoryForTest(std::move(f));
67 EXPECT_CALL(model_load_callback_, Run(_, _)); 69 EXPECT_CALL(model_load_callback_, Run(_, _));
68 } 70 }
69 71
70 void Start() { 72 void Start() {
71 preference_dtc_->LoadModels( 73 preference_dtc_->LoadModels(
72 base::Bind(&ModelLoadCallbackMock::Run, 74 base::Bind(&ModelLoadCallbackMock::Run,
73 base::Unretained(&model_load_callback_))); 75 base::Unretained(&model_load_callback_)));
74 preference_dtc_->StartAssociating( 76 preference_dtc_->StartAssociating(
75 base::Bind(&StartCallbackMock::Run, 77 base::Bind(&StartCallbackMock::Run,
76 base::Unretained(&start_callback_))); 78 base::Unretained(&start_callback_)));
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 EXPECT_CALL(model_load_callback_, Run(_, _)); 200 EXPECT_CALL(model_load_callback_, Run(_, _));
199 syncer::SyncError error(FROM_HERE, 201 syncer::SyncError error(FROM_HERE,
200 syncer::SyncError::DATATYPE_ERROR, 202 syncer::SyncError::DATATYPE_ERROR,
201 "error", 203 "error",
202 syncer::PREFERENCES); 204 syncer::PREFERENCES);
203 preference_dtc_->OnSingleDataTypeUnrecoverableError(error); 205 preference_dtc_->OnSingleDataTypeUnrecoverableError(error);
204 } 206 }
205 207
206 } // namespace 208 } // namespace
207 } // namespace sync_driver 209 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync_driver/ui_data_type_controller.cc ('k') | components/sync_sessions/favicon_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698