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

Unified Diff: google_apis/drive/drive_api_requests.h

Issue 140783006: drive: Support authorizing third-party Drive apps for opening files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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_app_registry.cc ('k') | google_apis/drive/drive_api_requests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/drive_api_requests.h
diff --git a/google_apis/drive/drive_api_requests.h b/google_apis/drive/drive_api_requests.h
index eabfb627590d1196951dd228b8dc97338eb831e6..5fd4eebc497ab691e8b04bceca00d56b24a7ec03 100644
--- a/google_apis/drive/drive_api_requests.h
+++ b/google_apis/drive/drive_api_requests.h
@@ -93,6 +93,38 @@ class FilesGetRequest : public DriveApiDataRequest {
DISALLOW_COPY_AND_ASSIGN(FilesGetRequest);
};
+//============================ FilesAuthorizeRequest ===========================
+
+// This class performs request for authorizing an app to access a file.
+// This request is mapped to /drive/v2internal/file/authorize internal endpoint.
+class FilesAuthorizeRequest : public DriveApiDataRequest {
+ public:
+ FilesAuthorizeRequest(RequestSender* sender,
+ const DriveApiUrlGenerator& url_generator,
+ const FileResourceCallback& callback);
+ virtual ~FilesAuthorizeRequest();
+
+ // Required parameter.
+ const std::string& file_id() const { return file_id_; }
+ void set_file_id(const std::string& file_id) { file_id_ = file_id; }
+ const std::string& app_id() const { return app_id_; }
+ void set_app_id(const std::string& app_id) { app_id_ = app_id; }
+
+ protected:
+ // Overridden from GetDataRequest.
+ virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE;
+
+ // Overridden from DriveApiDataRequest.
+ virtual GURL GetURLInternal() const OVERRIDE;
+
+ private:
+ const DriveApiUrlGenerator url_generator_;
+ std::string file_id_;
+ std::string app_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(FilesAuthorizeRequest);
+};
+
//============================ FilesInsertRequest =============================
// This class performs the request for creating a resource.
« no previous file with comments | « chrome/browser/drive/drive_app_registry.cc ('k') | google_apis/drive/drive_api_requests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698