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

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

Issue 371883003: Files.app: Add an private API to get a download URL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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.h
diff --git a/chrome/browser/chromeos/drive/file_system.h b/chrome/browser/chromeos/drive/file_system.h
index f16c7bf482d4396d1e45f009a069ef093a2207e6..dcce8cb3763c87deb9ceeeb14d85887a50debf12 100644
--- a/chrome/browser/chromeos/drive/file_system.h
+++ b/chrome/browser/chromeos/drive/file_system.h
@@ -141,10 +141,11 @@ class FileSystem : public FileSystemInterface,
const FileOperationCallback& completion_callback) OVERRIDE;
virtual void GetAvailableSpace(
const GetAvailableSpaceCallback& callback) OVERRIDE;
- virtual void GetShareUrl(
- const base::FilePath& file_path,
- const GURL& embed_origin,
- const GetShareUrlCallback& callback) OVERRIDE;
+ virtual void GetShareUrl(const base::FilePath& file_path,
+ const GURL& embed_origin,
+ const GetUrlCallback& callback) OVERRIDE;
+ virtual void GetDownloadUrl(const base::FilePath& file_path,
+ const GetUrlCallback& callback) OVERRIDE;
virtual void GetMetadata(
const GetFilesystemMetadataCallback& callback) OVERRIDE;
virtual void MarkCacheFileAsMounted(
@@ -223,10 +224,10 @@ class FileSystem : public FileSystemInterface,
// and then uses it to ask for the share url. |callback| must not be null.
void GetShareUrlAfterGetResourceEntry(const base::FilePath& file_path,
const GURL& embed_origin,
- const GetShareUrlCallback& callback,
+ const GetUrlCallback& callback,
ResourceEntry* entry,
FileError error);
- void OnGetResourceEntryForGetShareUrl(const GetShareUrlCallback& callback,
+ void OnGetResourceEntryForGetShareUrl(const GetUrlCallback& callback,
google_apis::GDataErrorCode status,
const GURL& share_url);
// Part of AddPermission.
@@ -237,6 +238,17 @@ class FileSystem : public FileSystemInterface,
ResourceEntry* entry,
FileError error);
+ // Part of GetDownloadUrl. Resolves the resource entry to get the resource it,
hashimoto 2014/07/09 07:48:57 s/it/ID/?
+ // and then uses it to ask for the share url. |callback| must not be null.
+ void GetDownloadUrlAfterGetResourceEntry(const base::FilePath& file_path,
+ const GetUrlCallback& callback,
+ ResourceEntry* entry,
+ FileError error);
+ void OnGetFileResourceForGetDownloadUrl(
+ const GetUrlCallback& callback,
+ google_apis::GDataErrorCode status,
+ scoped_ptr<google_apis::FileResource> file_resource);
+
// Part of OnDriveSyncError().
virtual void OnDriveSyncErrorAfterGetFilePath(
file_system::DriveSyncErrorType type,

Powered by Google App Engine
This is Rietveld 408576698