Index: chrome/browser/chromeos/gdata/drive_api_parser.h |
diff --git a/chrome/browser/chromeos/gdata/drive_api_parser.h b/chrome/browser/chromeos/gdata/drive_api_parser.h |
index a43f51c6656d63aeae3dba4d9b3d4139ca9f1df7..4ac0a0756bdf8e5651b4651e6c027ce1addec80d 100644 |
--- a/chrome/browser/chromeos/gdata/drive_api_parser.h |
+++ b/chrome/browser/chromeos/gdata/drive_api_parser.h |
@@ -275,6 +275,9 @@ class ParentReference { |
// Returns the file id of the reference. |
const std::string& file_id() const { return file_id_; } |
+ // Returns the URL for the parent in Drive. |
+ const GURL& parent_link() const { return parent_link_; } |
+ |
// Returns true if the reference is root directory. |
bool is_root() const { return is_root_; } |
@@ -287,6 +290,7 @@ class ParentReference { |
bool Parse(const base::Value& value); |
std::string file_id_; |
+ GURL parent_link_; |
bool is_root_; |
DISALLOW_COPY_AND_ASSIGN(ParentReference); |
@@ -323,15 +327,15 @@ class FileResource { |
// Returns the title of this file. |
const std::string& title() const { return title_; } |
+ // Returns created time of this file. |
+ const base::Time& created_date() const { return created_date_; } |
+ |
// Returns modification time by the user. |
const base::Time& modified_by_me_date() const { return modified_by_me_date_; } |
// Returns parent references (directories) of this file. |
const ScopedVector<ParentReference>& parents() const { return parents_; } |
- // Returns the download URL. |
- const GURL& download_url() const { return download_url_; } |
- |
// Returns the extension part of the filename. |
const std::string& file_extension() const { return file_extension_; } |
@@ -341,6 +345,27 @@ class FileResource { |
// Returns the size of this file in bytes. |
int64 file_size() const { return file_size_; } |
+ // 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 the link to JSON of this file itself. |
+ const GURL& self_link() const { return self_link_; } |
+ |
+ // Return the link to open the file in Google editor or viewer. |
+ // E.g. Google Document, Google Spreadsheet. |
+ const GURL& alternate_link() const { return alternate_link_; } |
+ |
+ // Returns the link for embedding the file. |
+ const GURL& embed_link() const { return embed_link_; } |
+ |
+ // Returns the link to the file's thumbnail. |
+ const GURL& thumbnail_link() const { return thumbnail_link_; } |
+ |
+ // Returns the link to open its downloadable content, using cookie based |
+ // authentication. |
+ const GURL& web_content_link() const { return web_content_link_; } |
+ |
private: |
friend class base::internal::RepeatedMessageConverter<FileResource>; |
friend class ChangeResource; |
@@ -355,12 +380,18 @@ class FileResource { |
std::string etag_; |
std::string mime_type_; |
std::string title_; |
+ base::Time created_date_; |
base::Time modified_by_me_date_; |
ScopedVector<ParentReference> parents_; |
- GURL download_url_; |
std::string file_extension_; |
std::string md5_checksum_; |
int64 file_size_; |
+ GURL download_url_; |
+ GURL self_link_; |
+ GURL alternate_link_; |
+ GURL embed_link_; |
+ GURL thumbnail_link_; |
+ GURL web_content_link_; |
DISALLOW_COPY_AND_ASSIGN(FileResource); |
}; |