diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-18 20:48:15 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-18 20:48:15 +0000 |
commit | 13846a58c952a4f888c8838ed1055134fb073368 (patch) | |
tree | 702c64405852aa73f6418135717d16cc2fa21d28 | |
parent | d14f0d7ef190777747c401c366a5faf3b1b3e861 (diff) | |
download | chromium_src-13846a58c952a4f888c8838ed1055134fb073368.zip chromium_src-13846a58c952a4f888c8838ed1055134fb073368.tar.gz chromium_src-13846a58c952a4f888c8838ed1055134fb073368.tar.bz2 |
gdata: Minor clean up for ResumeUploadParams.
The document title is unnecessary for resuming an upload.
BUG=none
TEST=compiles
Review URL: https://chromiumcodereview.appspot.com/10562045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142804 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chromeos/gdata/gdata_operations.cc | 4 | ||||
-rw-r--r-- | chrome/browser/chromeos/gdata/gdata_params.cc | 4 | ||||
-rw-r--r-- | chrome/browser/chromeos/gdata/gdata_params.h | 9 | ||||
-rw-r--r-- | chrome/browser/chromeos/gdata/gdata_uploader.cc | 3 |
4 files changed, 9 insertions, 11 deletions
diff --git a/chrome/browser/chromeos/gdata/gdata_operations.cc b/chrome/browser/chromeos/gdata/gdata_operations.cc index f017be7..4d6e8f9 100644 --- a/chrome/browser/chromeos/gdata/gdata_operations.cc +++ b/chrome/browser/chromeos/gdata/gdata_operations.cc @@ -1021,7 +1021,7 @@ bool ResumeUploadOperation::ProcessURLFetchResults( end_range_received = ranges[0].last_byte_position(); } } - DVLOG(1) << "Got response for [" << params_.title + DVLOG(1) << "Got response for [" << params_.virtual_path.value() << "]: code=" << code << ", range_hdr=[" << range_received << "], range_parsed=" << start_range_received @@ -1030,7 +1030,7 @@ bool ResumeUploadOperation::ProcessURLFetchResults( // There might be explanation of unexpected error code in response. std::string response_content; source->GetResponseAsString(&response_content); - DVLOG(1) << "Got response for [" << params_.title + DVLOG(1) << "Got response for [" << params_.virtual_path.value() << "]: code=" << code << ", content=[\n" << response_content << "\n]"; diff --git a/chrome/browser/chromeos/gdata/gdata_params.cc b/chrome/browser/chromeos/gdata/gdata_params.cc index b9fe656..5b3bd04 100644 --- a/chrome/browser/chromeos/gdata/gdata_params.cc +++ b/chrome/browser/chromeos/gdata/gdata_params.cc @@ -34,15 +34,13 @@ InitiateUploadParams::~InitiateUploadParams() { } ResumeUploadParams::ResumeUploadParams( - const std::string& title, int64 start_range, int64 end_range, int64 content_length, const std::string& content_type, scoped_refptr<net::IOBuffer> buf, const GURL& upload_location, - const FilePath& virtual_path) : title(title), - start_range(start_range), + const FilePath& virtual_path) : start_range(start_range), end_range(end_range), content_length(content_length), content_type(content_type), diff --git a/chrome/browser/chromeos/gdata/gdata_params.h b/chrome/browser/chromeos/gdata/gdata_params.h index 93d9ae3..583b910 100644 --- a/chrome/browser/chromeos/gdata/gdata_params.h +++ b/chrome/browser/chromeos/gdata/gdata_params.h @@ -40,8 +40,7 @@ struct ResumeUploadResponse { // Struct for passing params needed for DocumentsService::ResumeUpload() calls. struct ResumeUploadParams { - ResumeUploadParams(const std::string& title, - int64 start_range, + ResumeUploadParams(int64 start_range, int64 end_range, int64 content_length, const std::string& content_type, @@ -50,14 +49,16 @@ struct ResumeUploadParams { const FilePath& virtual_path); ~ResumeUploadParams(); - std::string title; // Title to be used for file to be uploaded. int64 start_range; // Start of range of contents currently stored in |buf|. int64 end_range; // End of range of contents currently stored in |buf|. int64 content_length; // File content-Length. std::string content_type; // Content-Type of file. scoped_refptr<net::IOBuffer> buf; // Holds current content to be uploaded. GURL upload_location; // Url of where to upload the file to. - FilePath virtual_path; // Virtual GData path of the file seen in the UI. + // Virtual GData path of the file seen in the UI. Not necessary for + // resuming an upload, but used for adding an entry to + // GDataOperationRegistry. + FilePath virtual_path; }; // Struct for passing params needed for DocumentsService::InitiateUpload() diff --git a/chrome/browser/chromeos/gdata/gdata_uploader.cc b/chrome/browser/chromeos/gdata/gdata_uploader.cc index 297362c..c2be139 100644 --- a/chrome/browser/chromeos/gdata/gdata_uploader.cc +++ b/chrome/browser/chromeos/gdata/gdata_uploader.cc @@ -291,8 +291,7 @@ void GDataUploader::ReadCompletionCallback( bytes_read - 1; documents_service_->ResumeUpload( - ResumeUploadParams(upload_file_info->title, - upload_file_info->start_range, + ResumeUploadParams(upload_file_info->start_range, upload_file_info->end_range, upload_file_info->content_length, upload_file_info->content_type, |