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

Side by Side Diff: chrome/browser/sync_file_system/local/local_file_sync_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/local/local_file_sync_service.h" 5 #include "chrome/browser/sync_file_system/local/local_file_sync_service.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 const GetLocalChangeProcessorCallback& get_local_change_processor) { 180 const GetLocalChangeProcessorCallback& get_local_change_processor) {
181 get_local_change_processor_ = get_local_change_processor; 181 get_local_change_processor_ = get_local_change_processor;
182 } 182 }
183 183
184 void LocalFileSyncService::HasPendingLocalChanges( 184 void LocalFileSyncService::HasPendingLocalChanges(
185 const FileSystemURL& url, 185 const FileSystemURL& url,
186 const HasPendingLocalChangeCallback& callback) { 186 const HasPendingLocalChangeCallback& callback) {
187 if (!base::ContainsKey(origin_to_contexts_, url.origin())) { 187 if (!base::ContainsKey(origin_to_contexts_, url.origin())) {
188 base::ThreadTaskRunnerHandle::Get()->PostTask( 188 base::ThreadTaskRunnerHandle::Get()->PostTask(
189 FROM_HERE, 189 FROM_HERE,
190 base::Bind(callback, SYNC_FILE_ERROR_INVALID_URL, false)); 190 base::BindOnce(callback, SYNC_FILE_ERROR_INVALID_URL, false));
191 return; 191 return;
192 } 192 }
193 sync_context_->HasPendingLocalChanges( 193 sync_context_->HasPendingLocalChanges(
194 origin_to_contexts_[url.origin()], url, callback); 194 origin_to_contexts_[url.origin()], url, callback);
195 } 195 }
196 196
197 void LocalFileSyncService::PromoteDemotedChanges( 197 void LocalFileSyncService::PromoteDemotedChanges(
198 const base::Closure& callback) { 198 const base::Closure& callback) {
199 if (origin_to_contexts_.empty()) { 199 if (origin_to_contexts_.empty()) {
200 callback.Run(); 200 callback.Run();
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 489
490 LocalChangeProcessor* LocalFileSyncService::GetLocalChangeProcessor( 490 LocalChangeProcessor* LocalFileSyncService::GetLocalChangeProcessor(
491 const FileSystemURL& url) { 491 const FileSystemURL& url) {
492 if (!get_local_change_processor_.is_null()) 492 if (!get_local_change_processor_.is_null())
493 return get_local_change_processor_.Run(url.origin()); 493 return get_local_change_processor_.Run(url.origin());
494 DCHECK(local_change_processor_); 494 DCHECK(local_change_processor_);
495 return local_change_processor_; 495 return local_change_processor_;
496 } 496 }
497 497
498 } // namespace sync_file_system 498 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698