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

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

Issue 98063002: Pass blocking pool runner to CreateTemporaryFile in SyncFS v2 drive_backend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/remote_to_local_syncer.h " 5 #include "chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h "
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 remote_change_processor()->ApplyRemoteChange( 571 remote_change_processor()->ApplyRemoteChange(
572 FileChange(FileChange::FILE_CHANGE_DELETE, SYNC_FILE_TYPE_UNKNOWN), 572 FileChange(FileChange::FILE_CHANGE_DELETE, SYNC_FILE_TYPE_UNKNOWN),
573 base::FilePath(), 573 base::FilePath(),
574 url_, 574 url_,
575 callback); 575 callback);
576 } 576 }
577 577
578 void RemoteToLocalSyncer::DownloadFile(const SyncStatusCallback& callback) { 578 void RemoteToLocalSyncer::DownloadFile(const SyncStatusCallback& callback) {
579 base::PostTaskAndReplyWithResult( 579 base::PostTaskAndReplyWithResult(
580 sync_context_->GetBlockingTaskRunner(), FROM_HERE, 580 sync_context_->GetBlockingTaskRunner(), FROM_HERE,
581 base::Bind(&sync_file_system::drive_backend::CreateTemporaryFile), 581 base::Bind(&sync_file_system::drive_backend::CreateTemporaryFile,
582 make_scoped_refptr(sync_context_->GetBlockingTaskRunner())),
582 base::Bind(&RemoteToLocalSyncer::DidCreateTemporaryFileForDownload, 583 base::Bind(&RemoteToLocalSyncer::DidCreateTemporaryFileForDownload,
583 weak_ptr_factory_.GetWeakPtr(), callback)); 584 weak_ptr_factory_.GetWeakPtr(), callback));
584 } 585 }
585 586
586 void RemoteToLocalSyncer::DidCreateTemporaryFileForDownload( 587 void RemoteToLocalSyncer::DidCreateTemporaryFileForDownload(
587 const SyncStatusCallback& callback, 588 const SyncStatusCallback& callback,
588 webkit_blob::ScopedFile file) { 589 webkit_blob::ScopedFile file) {
589 base::FilePath path = file.path(); 590 base::FilePath path = file.path();
590 drive_service()->DownloadFile( 591 drive_service()->DownloadFile(
591 path, remote_metadata_->file_id(), 592 path, remote_metadata_->file_id(),
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 return sync_context_->GetMetadataDatabase(); 665 return sync_context_->GetMetadataDatabase();
665 } 666 }
666 667
667 RemoteChangeProcessor* RemoteToLocalSyncer::remote_change_processor() { 668 RemoteChangeProcessor* RemoteToLocalSyncer::remote_change_processor() {
668 DCHECK(sync_context_->GetRemoteChangeProcessor()); 669 DCHECK(sync_context_->GetRemoteChangeProcessor());
669 return sync_context_->GetRemoteChangeProcessor(); 670 return sync_context_->GetRemoteChangeProcessor();
670 } 671 }
671 672
672 } // namespace drive_backend 673 } // namespace drive_backend
673 } // namespace sync_file_system 674 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698