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

Unified Diff: chrome/browser/drive/drive_api_service.cc

Issue 23591067: Add last_modified to CopyResource and MoveResource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/drive/drive_api_service.h ('k') | chrome/browser/drive/drive_service_interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/drive/drive_api_service.cc
diff --git a/chrome/browser/drive/drive_api_service.cc b/chrome/browser/drive/drive_api_service.cc
index a09332fc0eaf945dd3108169ecd11c5138d7c487..8d9b1445c46d0990ed92b9d230570dc4d37693a9 100644
--- a/chrome/browser/drive/drive_api_service.cc
+++ b/chrome/browser/drive/drive_api_service.cc
@@ -578,6 +578,7 @@ CancelCallback DriveAPIService::CopyResource(
const std::string& resource_id,
const std::string& parent_resource_id,
const std::string& new_title,
+ const base::Time& last_modified,
const GetResourceEntryCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
@@ -588,6 +589,7 @@ CancelCallback DriveAPIService::CopyResource(
request->set_file_id(resource_id);
request->add_parent(parent_resource_id);
request->set_title(new_title);
+ request->set_modified_date(last_modified);
request->set_fields(kFileResourceFields);
return sender_->StartRequestWithRetry(request);
}
@@ -612,6 +614,7 @@ CancelCallback DriveAPIService::MoveResource(
const std::string& resource_id,
const std::string& parent_resource_id,
const std::string& new_title,
+ const base::Time& last_modified,
const GetResourceEntryCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
@@ -623,6 +626,10 @@ CancelCallback DriveAPIService::MoveResource(
request->set_title(new_title);
if (!parent_resource_id.empty())
request->add_parent(parent_resource_id);
+ if (!last_modified.is_null()) {
+ request->set_set_modified_date(true);
+ request->set_modified_date(last_modified);
+ }
request->set_fields(kFileResourceFields);
return sender_->StartRequestWithRetry(request);
}
« no previous file with comments | « chrome/browser/drive/drive_api_service.h ('k') | chrome/browser/drive/drive_service_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698