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

Side by Side Diff: chrome/browser/sync_file_system/sync_file_system_service.cc

Issue 2826943002: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/sync_file_system (Closed)
Patch Set: Created 3 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 "chrome/browser/sync_file_system/sync_file_system_service.h" 5 #include "chrome/browser/sync_file_system/sync_file_system_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 328
329 void SyncFileSystemService::GetFileSyncStatus( 329 void SyncFileSystemService::GetFileSyncStatus(
330 const FileSystemURL& url, const SyncFileStatusCallback& callback) { 330 const FileSystemURL& url, const SyncFileStatusCallback& callback) {
331 DCHECK(local_service_); 331 DCHECK(local_service_);
332 DCHECK(remote_service_); 332 DCHECK(remote_service_);
333 333
334 // It's possible to get an invalid FileEntry. 334 // It's possible to get an invalid FileEntry.
335 if (!url.is_valid()) { 335 if (!url.is_valid()) {
336 base::ThreadTaskRunnerHandle::Get()->PostTask( 336 base::ThreadTaskRunnerHandle::Get()->PostTask(
337 FROM_HERE, 337 FROM_HERE, base::BindOnce(callback, SYNC_FILE_ERROR_INVALID_URL,
338 base::Bind(callback, 338 SYNC_FILE_STATUS_UNKNOWN));
339 SYNC_FILE_ERROR_INVALID_URL,
340 SYNC_FILE_STATUS_UNKNOWN));
341 return; 339 return;
342 } 340 }
343 341
344 local_service_->HasPendingLocalChanges( 342 local_service_->HasPendingLocalChanges(
345 url, 343 url,
346 base::Bind(&SyncFileSystemService::DidGetLocalChangeStatus, 344 base::Bind(&SyncFileSystemService::DidGetLocalChangeStatus,
347 AsWeakPtr(), callback)); 345 AsWeakPtr(), callback));
348 } 346 }
349 347
350 void SyncFileSystemService::AddSyncEventObserver(SyncEventObserver* observer) { 348 void SyncFileSystemService::AddSyncEventObserver(SyncEventObserver* observer) {
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 void(SyncProcessRunner::*method)()) { 755 void(SyncProcessRunner::*method)()) {
758 for (auto iter = local_sync_runners_.begin(); 756 for (auto iter = local_sync_runners_.begin();
759 iter != local_sync_runners_.end(); ++iter) 757 iter != local_sync_runners_.end(); ++iter)
760 (iter->get()->*method)(); 758 (iter->get()->*method)();
761 for (auto iter = remote_sync_runners_.begin(); 759 for (auto iter = remote_sync_runners_.begin();
762 iter != remote_sync_runners_.end(); ++iter) 760 iter != remote_sync_runners_.end(); ++iter)
763 (iter->get()->*method)(); 761 (iter->get()->*method)();
764 } 762 }
765 763
766 } // namespace sync_file_system 764 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698