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

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

Issue 13602003: Add new methods to DriveServiceInterface. These will replace GetResourceList. (Closed) Base URL: http://git.chromium.org/chromium/src.git@webkit_master
Patch Set: Created 7 years, 9 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/google_apis/drive_api_service.cc ('k') | chrome/browser/google_apis/dummy_drive_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/drive_service_interface.h
diff --git a/chrome/browser/google_apis/drive_service_interface.h b/chrome/browser/google_apis/drive_service_interface.h
index bbc6da98706714b59abe3cb174d47840c2f95d8b..8ef03a9a6f52a7f942b791b025f4b38cbf0e2823 100644
--- a/chrome/browser/google_apis/drive_service_interface.h
+++ b/chrome/browser/google_apis/drive_service_interface.h
@@ -131,6 +131,10 @@ class DriveServiceInterface {
// Returns the resource id for the root directory.
virtual std::string GetRootResourceId() const = 0;
+ // This method is being deprecated. One of GetAllResourceList,
+ // GetResourceListInDirectory, Search, SearchInDirectory, GetChangeList
+ // should be used after they are implemented.
+ //
// Fetches a resource list or a change list from |url|. If this URL is
// empty, the call will fetch from the default URL. When
// |start_changestamp| is 0, the default behavior is to fetch the resource
@@ -156,6 +160,74 @@ class DriveServiceInterface {
const std::string& directory_resource_id,
const GetResourceListCallback& callback) = 0;
+ // Fetches a resource list of the account. |callback| will be called upon
+ // completion.
+ // If the list is too long, it may be paged. In such a case, a URL to fetch
+ // remaining results will be included in the returned result. See also
+ // ContinueGetResourceList.
+ //
+ // |callback| must not be null.
+ virtual void GetAllResourceList(
+ const GetResourceListCallback& callback) = 0;
+
+ // Fetches a resource list in the directory with |directory_resource_id|.
+ // |callback| will be called upon completion.
+ // If the list is too long, it may be paged. In such a case, a URL to fetch
+ // remaining results will be included in the returned result. See also
+ // ContinueGetResourceList.
+ //
+ // |directory_resource_id| must not be empty.
+ // |callback| must not be null.
+ virtual void GetResourceListInDirectory(
+ const std::string& directory_resource_id,
+ const GetResourceListCallback& callback) = 0;
+
+ // Searches the resources for the |search_query| from all the user's
+ // resources. |callback| will be called upon completion.
+ // If the list is too long, it may be paged. In such a case, a URL to fetch
+ // remaining results will be included in the returned result. See also
+ // ContinueGetResourceList.
+ //
+ // |search_query| must not be empty.
+ // |callback| must not be null.
+ virtual void Search(
+ const std::string& search_query,
+ const GetResourceListCallback& callback) = 0;
+
+ // Searches the resources for the |search_query| from the directory with
+ // |directory_resource_id|. |callback| will be called upon completion.
+ // If the list is too long, it may be paged. In such a case, a URL to fetch
+ // remaining results will be included in the returned result. See also
+ // ContinueGetResourceList.
+ //
+ // Neither |search_query| nor |directory_resource_id| must be empty.
+ // |callback| must not be null.
+ virtual void SearchInDirectory(
+ const std::string& search_query,
+ const std::string& directory_resource_id,
+ const GetResourceListCallback& callback) = 0;
+
+ // Fetches change list since |start_changestamp|. |callback| will be
+ // called upon completion.
+ // If the list is too long, it may be paged. In such a case, a URL to fetch
+ // remaining results will be included in the returned result. See also
+ // ContinueGetResourceList.
+ //
+ // |callback| must not be null.
+ virtual void GetChangeList(
+ int64 start_changestamp,
+ const GetResourceListCallback& callback) = 0;
+
+ // Operations returning GetResourceList may be paged. In such a case,
+ // a URL to fetch remaining result is returned. The URL can be used for this
+ // method. |callback| will be called upon completion.
+ //
+ // |override_url| must not be empty.
+ // |callback| must not be null.
+ virtual void ContinueGetResourceList(
+ const GURL& override_url,
+ const GetResourceListCallback& callback) = 0;
+
// Fetches single entry metadata from server. The entry's resource id equals
// |resource_id|.
// Upon completion, invokes |callback| with results on the calling thread.
« no previous file with comments | « chrome/browser/google_apis/drive_api_service.cc ('k') | chrome/browser/google_apis/dummy_drive_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698