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

Unified Diff: chrome/browser/chromeos/drive/file_system/download_operation.h

Issue 16190003: drive: Add DownloadOperation::EnsureFileDownloadedByResourceId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment 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
Index: chrome/browser/chromeos/drive/file_system/download_operation.h
diff --git a/chrome/browser/chromeos/drive/file_system/download_operation.h b/chrome/browser/chromeos/drive/file_system/download_operation.h
index 5a1b43a17699d6e73bb5f28212eaad472224c746..432a0b6b106479f07adfde7154a9c5d951f70b76 100644
--- a/chrome/browser/chromeos/drive/file_system/download_operation.h
+++ b/chrome/browser/chromeos/drive/file_system/download_operation.h
@@ -45,9 +45,10 @@ class DownloadOperation {
internal::FileCache* cache);
~DownloadOperation();
- // Ensures that the file content is locally downloaded.
- // For hosted documents, this method may create a JSON file representing the
- // file.
+ // Ensures that the file content specified by |resource_id| is locally
+ // downloaded.
+ // For hosted documents, this method may create a JSON file representing th
+ // e file.
// For regular files, if the locally cached file is found, returns it.
// If not found, start to download the file from the server.
// When a JSON file is created, the cache file is found or downloading is
@@ -61,7 +62,16 @@ class DownloadOperation {
// |initialized_callback| and |get_content_callback| can be null if not
// needed.
// |completion_callback| must not be null.
- void EnsureFileDownloaded(
+ void EnsureFileDownloadedByResourceId(
+ const std::string& resource_id,
+ const ClientContext& context,
+ const GetFileContentInitializedCallback& initialized_callback,
+ const google_apis::GetContentCallback& get_content_callback,
+ const GetFileCallback& completion_callback);
+
+ // Does the same thing as EnsureFileDownloadedByResourceId for the file
+ // specified by |file_path|.
+ void EnsureFileDownloadedByPath(
const base::FilePath& file_path,
const ClientContext& context,
const GetFileContentInitializedCallback& initialized_callback,
@@ -78,7 +88,6 @@ class DownloadOperation {
// Part of EnsureFileDownloaded(). Called upon the completion of precondition
// check.
void EnsureFileDownloadedAfterCheckPreCondition(
- const base::FilePath& file_path,
const ClientContext& context,
const DownloadCallback& callback,
scoped_ptr<ResourceEntry> entry,
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/chromeos/drive/file_system/download_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698