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 ac0ff357b4452e7920253da3aaf3d80a376020bf..c8a27f2d5bb6a660c5167577aeaea4e76325907d 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc |
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc |
@@ -188,13 +188,31 @@ 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(); |
+ |
+ // Fetch the list of authors and their emails. |
+ const ScopedVector<Author>& authors = doc->authors(); |
zel
2012/02/29 23:46:38
kill authors, sorry for the confusion
|
+ file->authors_.resize(authors.size()); |
+ for (ScopedVector<Author>::const_iterator iter = authors.begin(); |
+ iter != authors.end(); ++iter) { |
+ std::string name = UTF16ToUTF8((*iter)->name()); |
+ file->authors_.push_back(std::make_pair(name, (*iter)->email())); |
+ } |
+ const Link* thumbnail_link = doc->GetLinkByType(Link::THUMBNAIL); |
+ if (thumbnail_link) |
+ file->thumbnail_url_ = thumbnail_link->href(); |
+ |
+ // TODO(gspencer): Add support for reading pinned 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), |
+ pinned_state_(PINNED_STATE_NONE) { |
DCHECK(parent); |
} |