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

Unified Diff: google_apis/drive/drive_api_parser.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: google_apis/drive/drive_api_parser.h
diff --git a/google_apis/drive/drive_api_parser.h b/google_apis/drive/drive_api_parser.h
index babb4cdc5c16aa737548cca079e136ee146d6905..bbff44a2de21d3ea9f9ad7696a018d2dbf84cd80 100644
--- a/google_apis/drive/drive_api_parser.h
+++ b/google_apis/drive/drive_api_parser.h
@@ -485,6 +485,10 @@ class FileResource {
// Returns the 'shared' attribute of the file.
bool shared() const { return shared_; }
+ // Returns the short-lived download URL for the file. This field exists
+ // only when the file content is stored in Drive.
+ const GURL& download_url() const { return download_url_; }
+
// Returns MD5 checksum of this file.
const std::string& md5_checksum() const { return md5_checksum_; }
@@ -536,6 +540,9 @@ class FileResource {
void set_shared(bool shared) {
shared_ = shared;
}
+ void set_download_url(const GURL& download_url) {
+ download_url_ = download_url;
+ }
void set_md5_checksum(const std::string& md5_checksum) {
md5_checksum_ = md5_checksum;
}
@@ -570,6 +577,7 @@ class FileResource {
base::Time last_viewed_by_me_date_;
base::Time shared_with_me_date_;
bool shared_;
+ GURL download_url_;
std::string md5_checksum_;
int64 file_size_;
GURL alternate_link_;

Powered by Google App Engine
This is Rietveld 408576698