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

Unified Diff: chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc

Issue 437943002: [SyncFS] Remove usage of file task runner under drive_backend/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Work for nits Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc b/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc
index 69da4f995a15ace0ea6d5b762ee19c2ba76757ab..5b60929d90abfc165074f79b1cae967a09b5100d 100644
--- a/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc
+++ b/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc
@@ -498,22 +498,7 @@ void LocalToRemoteSyncer::UploadExistingFile(scoped_ptr<SyncTaskToken> token) {
DCHECK(remote_file_tracker_->has_synced_details());
DCHECK(sync_context_->GetWorkerTaskRunner()->RunsTasksOnCurrentThread());
- base::Callback<void(const std::string&)> did_calculate_callback =
- base::Bind(&LocalToRemoteSyncer::DidGetMD5ForUpload,
- weak_ptr_factory_.GetWeakPtr(), base::Passed(&token));
-
- sync_context_->GetFileTaskRunner()->PostTask(
- FROM_HERE,
- CreateComposedFunction(
- base::Bind(&drive::util::GetMd5Digest, local_path_),
- RelayCallbackToTaskRunner(
- sync_context_->GetWorkerTaskRunner(), FROM_HERE,
- did_calculate_callback)));
-}
-
-void LocalToRemoteSyncer::DidGetMD5ForUpload(
- scoped_ptr<SyncTaskToken> token,
- const std::string& local_file_md5) {
+ const std::string local_file_md5 = drive::util::GetMd5Digest(local_path_);
if (local_file_md5 == remote_file_tracker_->synced_details().md5()) {
// Local file is not changed.
SyncCompleted(token.Pass(), SYNC_STATUS_OK);

Powered by Google App Engine
This is Rietveld 408576698