| Index: chrome/browser/chromeos/drive/file_system/drive_operations.cc
|
| diff --git a/chrome/browser/chromeos/drive/file_system/drive_operations.cc b/chrome/browser/chromeos/drive/file_system/drive_operations.cc
|
| index 9eaef46248255ba69b9187d8fccbcd6031f25ecf..64efe5f91e847fa9a92b5ae90ba279c6012d18ac 100644
|
| --- a/chrome/browser/chromeos/drive/file_system/drive_operations.cc
|
| +++ b/chrome/browser/chromeos/drive/file_system/drive_operations.cc
|
| @@ -8,6 +8,7 @@
|
| #include "chrome/browser/chromeos/drive/file_system/copy_operation.h"
|
| #include "chrome/browser/chromeos/drive/file_system/create_directory_operation.h"
|
| #include "chrome/browser/chromeos/drive/file_system/create_file_operation.h"
|
| +#include "chrome/browser/chromeos/drive/file_system/download_operation.h"
|
| #include "chrome/browser/chromeos/drive/file_system/move_operation.h"
|
| #include "chrome/browser/chromeos/drive/file_system/remove_operation.h"
|
| #include "chrome/browser/chromeos/drive/file_system/search_operation.h"
|
| @@ -57,6 +58,8 @@ void DriveOperations::Init(OperationObserver* observer,
|
| new MoveOperation(observer, scheduler, metadata));
|
| remove_operation_.reset(
|
| new RemoveOperation(observer, scheduler, metadata, cache));
|
| + download_operation_.reset(new DownloadOperation(
|
| + blocking_task_runner, observer, scheduler, metadata, cache));
|
| update_operation_.reset(
|
| new UpdateOperation(observer, scheduler, metadata, cache));
|
| search_operation_.reset(
|
| @@ -134,6 +137,20 @@ void DriveOperations::Remove(const base::FilePath& file_path,
|
| remove_operation_->Remove(file_path, is_recursive, callback);
|
| }
|
|
|
| +void DriveOperations::EnsureFileDownloaded(
|
| + const base::FilePath& file_path,
|
| + DriveClientContext context,
|
| + const GetFileContentInitializedCallback& initialized_callback,
|
| + const google_apis::GetContentCallback& get_content_callback,
|
| + const GetFileCallback& completion_callback) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK(!completion_callback.is_null());
|
| +
|
| + download_operation_->EnsureFileDownloaded(
|
| + file_path, context, initialized_callback, get_content_callback,
|
| + completion_callback);
|
| +}
|
| +
|
| void DriveOperations::UpdateFileByResourceId(
|
| const std::string& resource_id,
|
| DriveClientContext context,
|
|
|