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

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

Issue 12207075: Split InitiateUpload method into two. (Closed) Base URL: http://git.chromium.org/chromium/src.git@b148632_extract_initiate_upload_operation_base
Patch Set: Rebase. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/google_apis/base_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/base_operations.h
diff --git a/chrome/browser/google_apis/base_operations.h b/chrome/browser/google_apis/base_operations.h
index 41420b56183197e90fac4e8ed3641a2b05f6b20b..bdc2bbc22fa2689308c9c845fca2b0c53833a514 100644
--- a/chrome/browser/google_apis/base_operations.h
+++ b/chrome/browser/google_apis/base_operations.h
@@ -262,43 +262,6 @@ class GetDataOperation : public UrlFetchOperationBase {
//=========================== InitiateUploadOperation ==========================
-// Struct for passing params needed for DriveServiceInterface::InitiateUpload()
-// calls.
-//
-// When uploading a new file (UPLOAD_NEW_FILE):
-// - |title| should be set.
-// - |upload_location| should be the upload_url() of the parent directory.
-// (resumable-create-media URL)
-// - |etag| is ignored.
-//
-// When updating an existing file (UPLOAD_EXISTING_FILE):
-// - |title| should be empty
-// - |upload_location| should be the upload_url() of the existing file.
-// (resumable-edit-media URL)
-// - If |etag| should be empty or should match the etag() of the destination
-// file.
-// TODO(hidehiko): Get rid of this struct by splitting the method
-// InitiateUpload into two methods, InitiateUploadNewFile and
-// InitiateUploadExistingFile.
-struct InitiateUploadParams {
- InitiateUploadParams(UploadMode upload_mode,
- const std::string& title,
- const std::string& content_type,
- int64 content_length,
- const GURL& upload_location,
- const FilePath& drive_file_path,
- const std::string& etag);
- ~InitiateUploadParams();
-
- const UploadMode upload_mode;
- const std::string title;
- const std::string content_type;
- const int64 content_length;
- const GURL upload_location;
- const FilePath drive_file_path;
- const std::string etag;
-};
-
// Callback type for DocumentServiceInterface::InitiateUpload.
typedef base::Callback<void(GDataErrorCode error,
const GURL& upload_url)> InitiateUploadCallback;
« no previous file with comments | « no previous file | chrome/browser/google_apis/base_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698