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

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

Issue 22909041: Refactor GetAboutRequest and GetApplistRequest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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/gdata_wapi_service.cc ('k') | chrome/browser/google_apis/drive_api_requests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/drive_api_requests.h
diff --git a/chrome/browser/google_apis/drive_api_requests.h b/chrome/browser/google_apis/drive_api_requests.h
index e6128ea544a01514546200c144a9ef2021f204c5..c6f18daaded90726847ee8783511d24bf49b4a39 100644
--- a/chrome/browser/google_apis/drive_api_requests.h
+++ b/chrome/browser/google_apis/drive_api_requests.h
@@ -22,47 +22,6 @@ typedef base::Callback<void(GDataErrorCode error,
scoped_ptr<FileResource> entry)>
FileResourceCallback;
-
-//============================== GetAboutRequest =============================
-
-// This class performs the request for fetching About data.
-class GetAboutRequest : public GetDataRequest {
- public:
- GetAboutRequest(RequestSender* sender,
- const DriveApiUrlGenerator& url_generator,
- const GetAboutResourceCallback& callback);
- virtual ~GetAboutRequest();
-
- protected:
- // Overridden from GetDataRequest.
- virtual GURL GetURL() const OVERRIDE;
-
- private:
- const DriveApiUrlGenerator url_generator_;
-
- DISALLOW_COPY_AND_ASSIGN(GetAboutRequest);
-};
-
-//============================= GetApplistRequest ============================
-
-// This class performs the request for fetching Applist.
-class GetApplistRequest : public GetDataRequest {
- public:
- GetApplistRequest(RequestSender* sender,
- const DriveApiUrlGenerator& url_generator,
- const GetDataCallback& callback);
- virtual ~GetApplistRequest();
-
- protected:
- // Overridden from GetDataRequest.
- virtual GURL GetURL() const OVERRIDE;
-
- private:
- const DriveApiUrlGenerator url_generator_;
-
- DISALLOW_COPY_AND_ASSIGN(GetApplistRequest);
-};
-
//============================ GetChangelistRequest ==========================
// This class performs the request for fetching changelist.
@@ -153,6 +112,50 @@ class GetFileRequest : public GetDataRequest {
// namespace. crbug.com/180808
namespace drive {
+//============================== AboutGetRequest =============================
+
+// This class performs the request for fetching About data.
+// This request is mapped to
+// https://developers.google.com/drive/v2/reference/about/get
+class AboutGetRequest : public GetDataRequest {
+ public:
+ AboutGetRequest(RequestSender* sender,
+ const DriveApiUrlGenerator& url_generator,
+ const AboutResourceCallback& callback);
+ virtual ~AboutGetRequest();
+
+ protected:
+ // Overridden from GetDataRequest.
+ virtual GURL GetURL() const OVERRIDE;
+
+ private:
+ const DriveApiUrlGenerator url_generator_;
+
+ DISALLOW_COPY_AND_ASSIGN(AboutGetRequest);
+};
+
+//============================= AppsListRequest ============================
+
+// This class performs the request for fetching AppList.
+// This request is mapped to
+// https://developers.google.com/drive/v2/reference/apps/list
+class AppsListRequest : public GetDataRequest {
+ public:
+ AppsListRequest(RequestSender* sender,
+ const DriveApiUrlGenerator& url_generator,
+ const AppListCallback& callback);
+ virtual ~AppsListRequest();
+
+ protected:
+ // Overridden from GetDataRequest.
+ virtual GURL GetURL() const OVERRIDE;
+
+ private:
+ const DriveApiUrlGenerator url_generator_;
+
+ DISALLOW_COPY_AND_ASSIGN(AppsListRequest);
+};
+
//======================= ContinueGetFileListRequest =========================
// This class performs the request to fetch remaining Filelist result.
« no previous file with comments | « chrome/browser/drive/gdata_wapi_service.cc ('k') | chrome/browser/google_apis/drive_api_requests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698