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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.cc

Issue 9570031: This adds some more attributes to the GData files. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Upload after merge Created 8 years, 10 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/gdata/gdata_file_system.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_file_system.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc
index 80fc6cf3ed8b2fe316721050f2d2bc672fd12539..19c54466ccc97df0c37610b86b4c224cb7b903f9 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -190,13 +190,27 @@ GDataFileBase* GDataFile::FromDocumentEntry(GDataDirectory* parent,
file->file_info_.last_modified = doc->updated_time();
file->file_info_.last_accessed = doc->updated_time();
file->file_info_.creation_time = doc->published_time();
+
+ const Link* thumbnail_link = doc->GetLinkByType(Link::THUMBNAIL);
+ if (thumbnail_link)
+ file->thumbnail_url_ = thumbnail_link->href();
+
+ const Link* edit_link = doc->GetLinkByType(Link::EDIT);
+ if (edit_link)
+ file->edit_url_ = edit_link->href();
+
+ // TODO(gspencer): Add support for fetching cache state from the cache,
+ // when the cache code is done.
+
return file;
}
// GDataFile class implementation.
GDataFile::GDataFile(GDataDirectory* parent)
- : GDataFileBase(parent), kind_(gdata::DocumentEntry::UNKNOWN) {
+ : GDataFileBase(parent),
+ kind_(gdata::DocumentEntry::UNKNOWN),
+ cache_state_(CACHE_STATE_NONE) {
DCHECK(parent);
}
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698