Index: chrome/browser/chromeos/gdata/drive_api_operations.cc |
diff --git a/chrome/browser/chromeos/gdata/drive_api_operations.cc b/chrome/browser/chromeos/gdata/drive_api_operations.cc |
index fdc3f012e02ec7340c1a1a376e73f2082e19bb76..778d3b7fbe5f00bdf7d9b59e11161e0123901127 100644 |
--- a/chrome/browser/chromeos/gdata/drive_api_operations.cc |
+++ b/chrome/browser/chromeos/gdata/drive_api_operations.cc |
@@ -4,10 +4,15 @@ |
#include "chrome/browser/chromeos/gdata/drive_api_operations.h" |
+#include "base/string_number_conversions.h" |
+#include "chrome/common/net/url_util.h" |
+ |
namespace { |
const char kDriveV2AboutURL[] = "https://www.googleapis.com/drive/v2/about"; |
const char kDriveV2ApplistURL[] = "https://www.googleapis.com/drive/v2/apps"; |
+const char kDriveV2ChangelistURL[] = |
+ "https://www.googleapis.com/drive/v2/changes"; |
} // namespace |
@@ -38,4 +43,27 @@ GURL GetApplistOperation::GetURL() const { |
return GURL(kDriveV2ApplistURL); |
} |
+//============================ GetChangelistOperation ========================== |
+ |
+GetChangelistOperation::GetChangelistOperation( |
+ GDataOperationRegistry* registry, |
+ const GURL& url, |
+ int64 start_changestamp, |
+ const GetDataCallback& callback) |
+ : GetDataOperation(registry, callback), |
+ url_(kDriveV2ChangelistURL), |
+ start_changestamp_(start_changestamp) { |
+ if (!url.is_empty()) |
+ url_ = url; |
+} |
+ |
+GetChangelistOperation::~GetChangelistOperation() {} |
+ |
+GURL GetChangelistOperation::GetURL() const { |
+ if (start_changestamp_) |
+ return chrome_common_net::AppendOrReplaceQueryParameter( |
+ url_, "startChangeId", base::Int64ToString(start_changestamp_)); |
+ return url_; |
+} |
+ |
} // namespace gdata |