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

Side by Side Diff: sync/internal_api/test/fake_sync_manager.cc

Issue 1866243002: Convert //sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 "sync/internal_api/public/test/fake_sync_manager.h" 5 #include "sync/internal_api/public/test/fake_sync_manager.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 SyncEncryptionHandler* FakeSyncManager::GetEncryptionHandler() { 220 SyncEncryptionHandler* FakeSyncManager::GetEncryptionHandler() {
221 return fake_encryption_handler_.get(); 221 return fake_encryption_handler_.get();
222 } 222 }
223 223
224 ScopedVector<syncer::ProtocolEvent> 224 ScopedVector<syncer::ProtocolEvent>
225 FakeSyncManager::GetBufferedProtocolEvents() { 225 FakeSyncManager::GetBufferedProtocolEvents() {
226 return ScopedVector<syncer::ProtocolEvent>(); 226 return ScopedVector<syncer::ProtocolEvent>();
227 } 227 }
228 228
229 scoped_ptr<base::ListValue> FakeSyncManager::GetAllNodesForType( 229 std::unique_ptr<base::ListValue> FakeSyncManager::GetAllNodesForType(
230 syncer::ModelType type) { 230 syncer::ModelType type) {
231 return scoped_ptr<base::ListValue>(new base::ListValue()); 231 return std::unique_ptr<base::ListValue>(new base::ListValue());
232 } 232 }
233 233
234 void FakeSyncManager::RefreshTypes(ModelTypeSet types) { 234 void FakeSyncManager::RefreshTypes(ModelTypeSet types) {
235 last_refresh_request_types_ = types; 235 last_refresh_request_types_ = types;
236 } 236 }
237 237
238 void FakeSyncManager::RegisterDirectoryTypeDebugInfoObserver( 238 void FakeSyncManager::RegisterDirectoryTypeDebugInfoObserver(
239 syncer::TypeDebugInfoObserver* observer) {} 239 syncer::TypeDebugInfoObserver* observer) {}
240 240
241 void FakeSyncManager::UnregisterDirectoryTypeDebugInfoObserver( 241 void FakeSyncManager::UnregisterDirectoryTypeDebugInfoObserver(
242 syncer::TypeDebugInfoObserver* observer) {} 242 syncer::TypeDebugInfoObserver* observer) {}
243 243
244 bool FakeSyncManager::HasDirectoryTypeDebugInfoObserver( 244 bool FakeSyncManager::HasDirectoryTypeDebugInfoObserver(
245 syncer::TypeDebugInfoObserver* observer) { 245 syncer::TypeDebugInfoObserver* observer) {
246 return false; 246 return false;
247 } 247 }
248 248
249 void FakeSyncManager::RequestEmitDebugInfo() {} 249 void FakeSyncManager::RequestEmitDebugInfo() {}
250 250
251 void FakeSyncManager::OnIncomingInvalidation( 251 void FakeSyncManager::OnIncomingInvalidation(
252 syncer::ModelType type, 252 syncer::ModelType type,
253 scoped_ptr<InvalidationInterface> invalidation) { 253 std::unique_ptr<InvalidationInterface> invalidation) {
254 num_invalidations_received_++; 254 num_invalidations_received_++;
255 } 255 }
256 256
257 ModelTypeSet FakeSyncManager::GetLastRefreshRequestTypes() { 257 ModelTypeSet FakeSyncManager::GetLastRefreshRequestTypes() {
258 return last_refresh_request_types_; 258 return last_refresh_request_types_;
259 } 259 }
260 260
261 void FakeSyncManager::SetInvalidatorEnabled(bool invalidator_enabled) { 261 void FakeSyncManager::SetInvalidatorEnabled(bool invalidator_enabled) {
262 // Do nothing. 262 // Do nothing.
263 } 263 }
264 264
265 void FakeSyncManager::ClearServerData(const ClearServerDataCallback& callback) { 265 void FakeSyncManager::ClearServerData(const ClearServerDataCallback& callback) {
266 callback.Run(); 266 callback.Run();
267 } 267 }
268 268
269 void FakeSyncManager::OnCookieJarChanged(bool account_mismatch) {} 269 void FakeSyncManager::OnCookieJarChanged(bool account_mismatch) {}
270 270
271 } // namespace syncer 271 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698