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

Side by Side Diff: components/sync/driver/fake_sync_service.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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/fake_sync_service.h" 5 #include "components/sync/driver/fake_sync_service.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "components/sync/core/base_transaction.h" 9 #include "components/sync/core/base_transaction.h"
10 #include "components/sync/core/user_share.h" 10 #include "components/sync/core/user_share.h"
11 #include "components/sync/driver/data_type_controller.h"
11 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" 12 #include "components/sync/engine/cycle/sync_cycle_snapshot.h"
12 13
13 namespace sync_driver { 14 namespace sync_driver {
14 15
15 FakeSyncService::FakeSyncService() 16 FakeSyncService::FakeSyncService()
16 : error_(GoogleServiceAuthError::NONE), 17 : error_(GoogleServiceAuthError::NONE),
17 user_share_(base::MakeUnique<syncer::UserShare>()) {} 18 user_share_(base::MakeUnique<syncer::UserShare>()) {}
18 19
19 FakeSyncService::~FakeSyncService() {} 20 FakeSyncService::~FakeSyncService() {}
20 21
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 134
134 syncer::UserShare* FakeSyncService::GetUserShare() const { 135 syncer::UserShare* FakeSyncService::GetUserShare() const {
135 return user_share_.get(); 136 return user_share_.get();
136 } 137 }
137 138
138 LocalDeviceInfoProvider* FakeSyncService::GetLocalDeviceInfoProvider() const { 139 LocalDeviceInfoProvider* FakeSyncService::GetLocalDeviceInfoProvider() const {
139 return nullptr; 140 return nullptr;
140 } 141 }
141 142
142 void FakeSyncService::RegisterDataTypeController( 143 void FakeSyncService::RegisterDataTypeController(
143 sync_driver::DataTypeController* data_type_controller) {} 144 std::unique_ptr<sync_driver::DataTypeController> data_type_controller) {}
144 145
145 void FakeSyncService::ReenableDatatype(syncer::ModelType type) {} 146 void FakeSyncService::ReenableDatatype(syncer::ModelType type) {}
146 147
147 bool FakeSyncService::IsPassphraseRequired() const { 148 bool FakeSyncService::IsPassphraseRequired() const {
148 return false; 149 return false;
149 } 150 }
150 151
151 syncer::ModelTypeSet FakeSyncService::GetEncryptedDataTypes() const { 152 syncer::ModelTypeSet FakeSyncService::GetEncryptedDataTypes() const {
152 return syncer::ModelTypeSet(); 153 return syncer::ModelTypeSet();
153 } 154 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 syncer::TypeDebugInfoObserver* observer) {} 207 syncer::TypeDebugInfoObserver* observer) {}
207 208
208 base::WeakPtr<syncer::JsController> FakeSyncService::GetJsController() { 209 base::WeakPtr<syncer::JsController> FakeSyncService::GetJsController() {
209 return base::WeakPtr<syncer::JsController>(); 210 return base::WeakPtr<syncer::JsController>();
210 } 211 }
211 212
212 void FakeSyncService::GetAllNodes( 213 void FakeSyncService::GetAllNodes(
213 const base::Callback<void(std::unique_ptr<base::ListValue>)>& callback) {} 214 const base::Callback<void(std::unique_ptr<base::ListValue>)>& callback) {}
214 215
215 } // namespace sync_driver 216 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync/driver/fake_sync_service.h ('k') | components/sync/driver/frontend_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698