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

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

Issue 140513008: drive: Allow setting modified/accessed date with AddNewDirectory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
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 "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 24 matching lines...) Expand all
35 virtual ~DriveServiceObserver() {} 35 virtual ~DriveServiceObserver() {}
36 }; 36 };
37 37
38 // This defines an interface for sharing by DriveService and MockDriveService 38 // This defines an interface for sharing by DriveService and MockDriveService
39 // so that we can do testing of clients of DriveService. 39 // so that we can do testing of clients of DriveService.
40 // 40 //
41 // All functions must be called on UI thread. DriveService is built on top of 41 // All functions must be called on UI thread. DriveService is built on top of
42 // URLFetcher that runs on UI thread. 42 // URLFetcher that runs on UI thread.
43 class DriveServiceInterface { 43 class DriveServiceInterface {
44 public: 44 public:
45 // Optional parameters for AddNewDirectory().
46 struct AddNewDirectoryOptions {
47 AddNewDirectoryOptions();
48 ~AddNewDirectoryOptions();
49
50 // modified_date of the directory.
51 // Pass the null Time if you are not interested in setting this property.
52 base::Time modified_date;
53
54 // last_viewed_by_me_date of the directory.
55 // Pass the null Time if you are not interested in setting this property.
56 base::Time last_viewed_by_me_date;
57 };
58
45 // Optional parameters for InitiateUploadNewFile(). 59 // Optional parameters for InitiateUploadNewFile().
46 struct InitiateUploadNewFileOptions { 60 struct InitiateUploadNewFileOptions {
47 InitiateUploadNewFileOptions(); 61 InitiateUploadNewFileOptions();
48 ~InitiateUploadNewFileOptions(); 62 ~InitiateUploadNewFileOptions();
49 63
50 // modified_date of the file. 64 // modified_date of the file.
51 // Pass the null Time if you are not interested in setting this property. 65 // Pass the null Time if you are not interested in setting this property.
52 base::Time modified_date; 66 base::Time modified_date;
53 67
54 // last_viewed_by_me_date of the file. 68 // last_viewed_by_me_date of the file.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // identified with |parent_resource_id|. |parent_resource_id| can be the 328 // identified with |parent_resource_id|. |parent_resource_id| can be the
315 // value returned by GetRootResourceId to represent the root directory. 329 // value returned by GetRootResourceId to represent the root directory.
316 // Upon completion, invokes |callback| and passes newly created entry on 330 // Upon completion, invokes |callback| and passes newly created entry on
317 // the calling thread. 331 // the calling thread.
318 // This function cannot be named as "CreateDirectory" as it conflicts with 332 // This function cannot be named as "CreateDirectory" as it conflicts with
319 // a macro on Windows. 333 // a macro on Windows.
320 // |callback| must not be null. 334 // |callback| must not be null.
321 virtual google_apis::CancelCallback AddNewDirectory( 335 virtual google_apis::CancelCallback AddNewDirectory(
322 const std::string& parent_resource_id, 336 const std::string& parent_resource_id,
323 const std::string& directory_title, 337 const std::string& directory_title,
338 const AddNewDirectoryOptions& options,
324 const google_apis::GetResourceEntryCallback& callback) = 0; 339 const google_apis::GetResourceEntryCallback& callback) = 0;
325 340
326 // Downloads a file with |resourced_id|. The downloaded file will 341 // Downloads a file with |resourced_id|. The downloaded file will
327 // be stored at |local_cache_path| location. Upon completion, invokes 342 // be stored at |local_cache_path| location. Upon completion, invokes
328 // |download_action_callback| with results on the calling thread. 343 // |download_action_callback| with results on the calling thread.
329 // If |get_content_callback| is not empty, 344 // If |get_content_callback| is not empty,
330 // URLFetcherDelegate::OnURLFetchDownloadData will be called, which will in 345 // URLFetcherDelegate::OnURLFetchDownloadData will be called, which will in
331 // turn invoke |get_content_callback| on the calling thread. 346 // turn invoke |get_content_callback| on the calling thread.
332 // If |progress_callback| is not empty, it is invoked periodically when 347 // If |progress_callback| is not empty, it is invoked periodically when
333 // the download made some progress. 348 // the download made some progress.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 // 431 //
417 // |callback| must not be null. 432 // |callback| must not be null.
418 virtual google_apis::CancelCallback GetRemainingResourceList( 433 virtual google_apis::CancelCallback GetRemainingResourceList(
419 const GURL& next_link, 434 const GURL& next_link,
420 const google_apis::GetResourceListCallback& callback) = 0; 435 const google_apis::GetResourceListCallback& callback) = 0;
421 }; 436 };
422 437
423 } // namespace drive 438 } // namespace drive
424 439
425 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ 440 #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/drive_service_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698