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

Unified Diff: chrome/browser/chromeos/drive/file_system/operations.cc

Issue 15681009: Extract GetResolveFile into DownloadOperation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 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
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/operations.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/file_system/operations.cc
diff --git a/chrome/browser/chromeos/drive/file_system/operations.cc b/chrome/browser/chromeos/drive/file_system/operations.cc
index 04c9d9912fb919a77e782668fc48f1d9d3d725a6..7ebb8e4d6f18c899999e2b1dbc5f3ea1557f3b5c 100644
--- a/chrome/browser/chromeos/drive/file_system/operations.cc
+++ b/chrome/browser/chromeos/drive/file_system/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"
@@ -60,6 +61,8 @@ void Operations::Init(OperationObserver* observer,
new RemoveOperation(observer, scheduler, metadata, cache));
touch_operation_.reset(
new TouchOperation(blocking_task_runner, observer, scheduler, metadata));
+ download_operation_.reset(new DownloadOperation(
+ blocking_task_runner, observer, scheduler, metadata, cache));
update_operation_.reset(
new UpdateOperation(observer, scheduler, metadata, cache));
search_operation_.reset(
@@ -150,6 +153,20 @@ void Operations::TouchFile(const base::FilePath& file_path,
file_path, last_access_time, last_modified_time, callback);
}
+void Operations::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 Operations::UpdateFileByResourceId(
const std::string& resource_id,
DriveClientContext context,
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/operations.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698