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

Side by Side Diff: chrome/browser/drive/drive_service_interface.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/drive/drive_api_service.cc ('k') | chrome/browser/drive/dummy_drive_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_
6 #define CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ 6 #define CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/google_apis/auth_service_interface.h" 10 #include "chrome/browser/google_apis/auth_service_interface.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // Upon completion, invokes |callback| with results on the calling thread. 194 // Upon completion, invokes |callback| with results on the calling thread.
195 // |callback| must not be null. 195 // |callback| must not be null.
196 virtual google_apis::CancelCallback DeleteResource( 196 virtual google_apis::CancelCallback DeleteResource(
197 const std::string& resource_id, 197 const std::string& resource_id,
198 const std::string& etag, 198 const std::string& etag,
199 const google_apis::EntryActionCallback& callback) = 0; 199 const google_apis::EntryActionCallback& callback) = 0;
200 200
201 // Makes a copy of a resource with |resource_id|. 201 // Makes a copy of a resource with |resource_id|.
202 // The new resource will be put under a directory with |parent_resource_id|, 202 // The new resource will be put under a directory with |parent_resource_id|,
203 // and it'll be named |new_title|. 203 // and it'll be named |new_title|.
204 // If |last_modified| is not null, the modified date of the resource on the
205 // server will be set to the date.
204 // This request is supported only on DriveAPIService, because GData WAPI 206 // This request is supported only on DriveAPIService, because GData WAPI
205 // doesn't support the function unfortunately. 207 // doesn't support the function unfortunately.
206 // Upon completion, invokes |callback| with results on the calling thread. 208 // Upon completion, invokes |callback| with results on the calling thread.
207 // |callback| must not be null. 209 // |callback| must not be null.
208 virtual google_apis::CancelCallback CopyResource( 210 virtual google_apis::CancelCallback CopyResource(
209 const std::string& resource_id, 211 const std::string& resource_id,
210 const std::string& parent_resource_id, 212 const std::string& parent_resource_id,
211 const std::string& new_title, 213 const std::string& new_title,
214 const base::Time& last_modified,
212 const google_apis::GetResourceEntryCallback& callback) = 0; 215 const google_apis::GetResourceEntryCallback& callback) = 0;
213 216
214 // Makes a copy of a hosted document identified by its |resource_id|. 217 // Makes a copy of a hosted document identified by its |resource_id|.
215 // The copy is named as the UTF-8 encoded |new_title| and is not added to any 218 // The copy is named as the UTF-8 encoded |new_title| and is not added to any
216 // collection. Use AddResourceToDirectory() to add the copy to a collection 219 // collection. Use AddResourceToDirectory() to add the copy to a collection
217 // when needed. Upon completion, invokes |callback| with results on the 220 // when needed. Upon completion, invokes |callback| with results on the
218 // calling thread. 221 // calling thread.
219 // |callback| must not be null. 222 // |callback| must not be null.
220 // TODO(hidehiko): After the migration to Drive API v2, remove this method, 223 // TODO(hidehiko): After the migration to Drive API v2, remove this method,
221 // because we can use CopyResource instead. 224 // because we can use CopyResource instead.
222 virtual google_apis::CancelCallback CopyHostedDocument( 225 virtual google_apis::CancelCallback CopyHostedDocument(
223 const std::string& resource_id, 226 const std::string& resource_id,
224 const std::string& new_title, 227 const std::string& new_title,
225 const google_apis::GetResourceEntryCallback& callback) = 0; 228 const google_apis::GetResourceEntryCallback& callback) = 0;
226 229
227 // Moves a resource with |resource_id| to the directory of 230 // Moves a resource with |resource_id| to the directory of
228 // |parent_resource_id| with renaming to |new_title|. 231 // |parent_resource_id| with renaming to |new_title|.
232 // If |last_modified| is not null, the modified date of the resource on the
233 // server will be set to the date.
229 // This request is supported only on DriveAPIService, because GData WAPI 234 // This request is supported only on DriveAPIService, because GData WAPI
230 // doesn't support the function unfortunately. 235 // doesn't support the function unfortunately.
231 // Upon completion, invokes |callback| with results on the calling thread. 236 // Upon completion, invokes |callback| with results on the calling thread.
232 // |callback| must not be null. 237 // |callback| must not be null.
233 virtual google_apis::CancelCallback MoveResource( 238 virtual google_apis::CancelCallback MoveResource(
234 const std::string& resource_id, 239 const std::string& resource_id,
235 const std::string& parent_resource_id, 240 const std::string& parent_resource_id,
236 const std::string& new_title, 241 const std::string& new_title,
242 const base::Time& last_modified,
237 const google_apis::GetResourceEntryCallback& callback) = 0; 243 const google_apis::GetResourceEntryCallback& callback) = 0;
238 244
239 // Renames a document or collection identified by its |resource_id| 245 // Renames a document or collection identified by its |resource_id|
240 // to the UTF-8 encoded |new_title|. Upon completion, 246 // to the UTF-8 encoded |new_title|. Upon completion,
241 // invokes |callback| with results on the calling thread. 247 // invokes |callback| with results on the calling thread.
242 // |callback| must not be null. 248 // |callback| must not be null.
243 virtual google_apis::CancelCallback RenameResource( 249 virtual google_apis::CancelCallback RenameResource(
244 const std::string& resource_id, 250 const std::string& resource_id,
245 const std::string& new_title, 251 const std::string& new_title,
246 const google_apis::EntryActionCallback& callback) = 0; 252 const google_apis::EntryActionCallback& callback) = 0;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // 380 //
375 // |callback| must not be null. 381 // |callback| must not be null.
376 virtual google_apis::CancelCallback GetRemainingResourceList( 382 virtual google_apis::CancelCallback GetRemainingResourceList(
377 const GURL& next_link, 383 const GURL& next_link,
378 const google_apis::GetResourceListCallback& callback) = 0; 384 const google_apis::GetResourceListCallback& callback) = 0;
379 }; 385 };
380 386
381 } // namespace drive 387 } // namespace drive
382 388
383 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ 389 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_
OLDNEW
« no previous file with comments | « chrome/browser/drive/drive_api_service.cc ('k') | chrome/browser/drive/dummy_drive_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698