OLD | NEW |
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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 void LocalToRemoteSyncer::UploadExistingFile( | 395 void LocalToRemoteSyncer::UploadExistingFile( |
396 const SyncStatusCallback& callback) { | 396 const SyncStatusCallback& callback) { |
397 DCHECK(remote_file_tracker_); | 397 DCHECK(remote_file_tracker_); |
398 DCHECK(remote_file_tracker_->has_synced_details()); | 398 DCHECK(remote_file_tracker_->has_synced_details()); |
399 DCHECK(sync_context_->GetWorkerTaskRunner()->RunsTasksOnCurrentThread()); | 399 DCHECK(sync_context_->GetWorkerTaskRunner()->RunsTasksOnCurrentThread()); |
400 | 400 |
401 base::Callback<void(const std::string&)> did_calculate_callback = | 401 base::Callback<void(const std::string&)> did_calculate_callback = |
402 base::Bind(&LocalToRemoteSyncer::DidGetMD5ForUpload, | 402 base::Bind(&LocalToRemoteSyncer::DidGetMD5ForUpload, |
403 weak_ptr_factory_.GetWeakPtr(), callback); | 403 weak_ptr_factory_.GetWeakPtr(), callback); |
404 | 404 |
405 sync_context_->GetWorkerTaskRunner()->PostTask( | 405 sync_context_->GetFileTaskRunner()->PostTask( |
406 FROM_HERE, | 406 FROM_HERE, |
407 CreateComposedFunction( | 407 CreateComposedFunction( |
408 base::Bind(&drive::util::GetMd5Digest, local_path_), | 408 base::Bind(&drive::util::GetMd5Digest, local_path_), |
409 RelayCallbackToTaskRunner( | 409 RelayCallbackToTaskRunner( |
410 sync_context_->GetWorkerTaskRunner(), FROM_HERE, | 410 sync_context_->GetWorkerTaskRunner(), FROM_HERE, |
411 did_calculate_callback))); | 411 did_calculate_callback))); |
412 } | 412 } |
413 | 413 |
414 void LocalToRemoteSyncer::DidGetMD5ForUpload( | 414 void LocalToRemoteSyncer::DidGetMD5ForUpload( |
415 const SyncStatusCallback& callback, | 415 const SyncStatusCallback& callback, |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 set_used_network(true); | 704 set_used_network(true); |
705 return sync_context_->GetDriveUploader(); | 705 return sync_context_->GetDriveUploader(); |
706 } | 706 } |
707 | 707 |
708 MetadataDatabase* LocalToRemoteSyncer::metadata_database() { | 708 MetadataDatabase* LocalToRemoteSyncer::metadata_database() { |
709 return sync_context_->GetMetadataDatabase(); | 709 return sync_context_->GetMetadataDatabase(); |
710 } | 710 } |
711 | 711 |
712 } // namespace drive_backend | 712 } // namespace drive_backend |
713 } // namespace sync_file_system | 713 } // namespace sync_file_system |
OLD | NEW |