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

Unified Diff: chrome/browser/google_apis/gdata_wapi_parser.h

Issue 11421125: Implement polling part of DriveFileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 8 years 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: chrome/browser/google_apis/gdata_wapi_parser.h
diff --git a/chrome/browser/google_apis/gdata_wapi_parser.h b/chrome/browser/google_apis/gdata_wapi_parser.h
index 684b219b70f6230eb552a7b39ddcc86e2655d765..99395e1a683ee1b8ebc0bad2aa287fe44283d489 100644
--- a/chrome/browser/google_apis/gdata_wapi_parser.h
+++ b/chrome/browser/google_apis/gdata_wapi_parser.h
@@ -382,10 +382,15 @@ class DocumentEntry : public FeedEntry {
static void RegisterJSONConverter(
base::JSONValueConverter<DocumentEntry>* converter);
- // Helper function for parsing bool fields based on presence of
- // their value nodes.
+ // Sets true to |result| if the field exists.
+ // Always returns true even when the field does not exist.
static bool HasFieldPresent(const base::Value* value, bool* result);
+ // Parses |value| as int64 and sets it to |result|. If the field does not
+ // exist, sets 0 to |result| as default value.
+ // Returns true if |value| is NULL or it is parsed as int64 successfully.
+ static bool ParseChangestamp(const base::Value* value, int64* result);
+
// Returns true if |file| has one of the hosted document extensions.
static bool HasHostedDocumentExtension(const FilePath& file);
@@ -434,6 +439,10 @@ class DocumentEntry : public FeedEntry {
// True if the file or directory is deleted (applicable to change feeds only).
bool deleted() const { return deleted_ || removed_; }
+ // Changestamp (exists only for change query results).
+ // If not exists, defaults to 0.
+ int64 changestamp() const { return changestamp_; }
+
// Text version of document entry kind. Returns an empty string for
// unknown entry kind.
std::string GetEntryKindText() const;
@@ -517,6 +526,7 @@ class DocumentEntry : public FeedEntry {
int64 file_size_;
bool deleted_;
bool removed_;
+ int64 changestamp_;
DISALLOW_COPY_AND_ASSIGN(DocumentEntry);
};

Powered by Google App Engine
This is Rietveld 408576698