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

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

Issue 12090015: Implement CreateDirectoryOperation on Drive API v2. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add an empty line. Created 7 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 | « no previous file | chrome/browser/google_apis/drive_api_operations.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_operations.h
diff --git a/chrome/browser/google_apis/drive_api_operations.h b/chrome/browser/google_apis/drive_api_operations.h
index 6dc52a933216067358ec197eca76d288c6d1a6b3..0c52fb2b961197e04ad136e4a9382cafefaaf2f1 100644
--- a/chrome/browser/google_apis/drive_api_operations.h
+++ b/chrome/browser/google_apis/drive_api_operations.h
@@ -138,6 +138,43 @@ class GetFileOperation : public GetDataOperation {
DISALLOW_COPY_AND_ASSIGN(GetFileOperation);
};
+// This namespace is introduced to avoid class name confliction between
+// the operations for Drive API v2 and GData WAPI for transition.
+// And, when the migration is done and GData WAPI's code is cleaned up,
+// classes inside this namespace should be moved to the google_apis namespace.
+// TODO(hidehiko): Get rid of this namespace after the migration.
+namespace drive {
+
+//========================== CreateDirectoryOperation ==========================
+
+// This class performs the operation for creating a directory.
+class CreateDirectoryOperation : public GetDataOperation {
+ public:
+ CreateDirectoryOperation(
+ OperationRegistry* registry,
+ net::URLRequestContextGetter* url_request_context_getter,
+ const DriveApiUrlGenerator& url_generator,
+ const std::string& parent_resource_id,
+ const std::string& directory_name,
+ const GetDataCallback& callback);
+ virtual ~CreateDirectoryOperation();
+
+ protected:
+ // Overridden from GetDataOperation.
+ virtual GURL GetURL() const OVERRIDE;
+ virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE;
+ virtual bool GetContentData(std::string* upload_content_type,
+ std::string* upload_content) OVERRIDE;
+
+ private:
+ const DriveApiUrlGenerator url_generator_;
+ const std::string parent_resource_id_;
+ const std::string directory_name_;
+
+ DISALLOW_COPY_AND_ASSIGN(CreateDirectoryOperation);
+};
+
+} // namespace drive
} // namespace google_apis
#endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_OPERATIONS_H_
« no previous file with comments | « no previous file | chrome/browser/google_apis/drive_api_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698