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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc

Issue 243583005: Revert of [SyncFS] Post tasks between SyncEngine and SyncWorker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/drive_backend/local_to_remote_syncer.h " 5 #include "chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.h "
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 } 377 }
378 callback.Run(SYNC_STATUS_OK); 378 callback.Run(SYNC_STATUS_OK);
379 } 379 }
380 380
381 void LocalToRemoteSyncer::UploadExistingFile( 381 void LocalToRemoteSyncer::UploadExistingFile(
382 const SyncStatusCallback& callback) { 382 const SyncStatusCallback& callback) {
383 DCHECK(remote_file_tracker_); 383 DCHECK(remote_file_tracker_);
384 DCHECK(remote_file_tracker_->has_synced_details()); 384 DCHECK(remote_file_tracker_->has_synced_details());
385 385
386 base::PostTaskAndReplyWithResult( 386 base::PostTaskAndReplyWithResult(
387 sync_context_->GetFileTaskRunner(), FROM_HERE, 387 sync_context_->GetBlockingTaskRunner(), FROM_HERE,
388 base::Bind(&drive::util::GetMd5Digest, local_path_), 388 base::Bind(&drive::util::GetMd5Digest, local_path_),
389 base::Bind(&LocalToRemoteSyncer::DidGetMD5ForUpload, 389 base::Bind(&LocalToRemoteSyncer::DidGetMD5ForUpload,
390 weak_ptr_factory_.GetWeakPtr(), 390 weak_ptr_factory_.GetWeakPtr(),
391 callback)); 391 callback));
392 } 392 }
393 393
394 void LocalToRemoteSyncer::DidGetMD5ForUpload( 394 void LocalToRemoteSyncer::DidGetMD5ForUpload(
395 const SyncStatusCallback& callback, 395 const SyncStatusCallback& callback,
396 const std::string& local_file_md5) { 396 const std::string& local_file_md5) {
397 if (local_file_md5 == remote_file_tracker_->synced_details().md5()) { 397 if (local_file_md5 == remote_file_tracker_->synced_details().md5()) {
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 set_used_network(true); 685 set_used_network(true);
686 return sync_context_->GetDriveUploader(); 686 return sync_context_->GetDriveUploader();
687 } 687 }
688 688
689 MetadataDatabase* LocalToRemoteSyncer::metadata_database() { 689 MetadataDatabase* LocalToRemoteSyncer::metadata_database() {
690 return sync_context_->GetMetadataDatabase(); 690 return sync_context_->GetMetadataDatabase();
691 } 691 }
692 692
693 } // namespace drive_backend 693 } // namespace drive_backend
694 } // namespace sync_file_system 694 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698