| Index: chrome/browser/google_apis/gdata_wapi_parser.cc
|
| diff --git a/chrome/browser/google_apis/gdata_wapi_parser.cc b/chrome/browser/google_apis/gdata_wapi_parser.cc
|
| index ccf6edcf7772e12341b24b175fb0da25ba6acf69..c0ecd8504c1bcfdb5a2289b3c975c9bffc50b285 100644
|
| --- a/chrome/browser/google_apis/gdata_wapi_parser.cc
|
| +++ b/chrome/browser/google_apis/gdata_wapi_parser.cc
|
| @@ -68,6 +68,7 @@ const char kWritersCanInviteNode[] = "writersCanInvite";
|
| // Field names.
|
| const char kAuthorField[] = "author";
|
| const char kCategoryField[] = "category";
|
| +const char kChangestampField[] = "docs$changestamp.value";
|
| const char kContentField[] = "content";
|
| const char kDeletedField[] = "gd$deleted";
|
| const char kETagField[] = "gd$etag";
|
| @@ -593,7 +594,8 @@ DocumentEntry::DocumentEntry()
|
| : kind_(ENTRY_KIND_UNKNOWN),
|
| file_size_(0),
|
| deleted_(false),
|
| - removed_(false) {
|
| + removed_(false),
|
| + changestamp_(0) {
|
| }
|
|
|
| DocumentEntry::~DocumentEntry() {
|
| @@ -605,6 +607,14 @@ bool DocumentEntry::HasFieldPresent(const base::Value* value,
|
| return true;
|
| }
|
|
|
| +bool DocumentEntry::ParseOptionalChangestamp(const base::StringPiece& value,
|
| + int64* result) {
|
| + DCHECK(result);
|
| + if (!base::StringToInt64(value, result))
|
| + *result = 0;
|
| + return true;
|
| +}
|
| +
|
| // static
|
| void DocumentEntry::RegisterJSONConverter(
|
| base::JSONValueConverter<DocumentEntry>* converter) {
|
| @@ -640,6 +650,9 @@ void DocumentEntry::RegisterJSONConverter(
|
| kDeletedField, &DocumentEntry::deleted_, &DocumentEntry::HasFieldPresent);
|
| converter->RegisterCustomValueField<bool>(
|
| kRemovedField, &DocumentEntry::removed_, &DocumentEntry::HasFieldPresent);
|
| + converter->RegisterCustomField<int64>(
|
| + kChangestampField, &DocumentEntry::changestamp_,
|
| + &DocumentEntry::ParseOptionalChangestamp);
|
| }
|
|
|
| std::string DocumentEntry::GetHostedDocumentExtension() const {
|
|
|