| Index: chrome/browser/chromeos/gdata/gdata_operations.cc
|
| diff --git a/chrome/browser/chromeos/gdata/gdata_operations.cc b/chrome/browser/chromeos/gdata/gdata_operations.cc
|
| index a1b206e2de7d426964f5a2fcd46bfba1f315527f..44a2b50c755cb9cb8d198a81cd39dbb60b1ef2bf 100644
|
| --- a/chrome/browser/chromeos/gdata/gdata_operations.cc
|
| +++ b/chrome/browser/chromeos/gdata/gdata_operations.cc
|
| @@ -161,7 +161,7 @@ namespace gdata {
|
|
|
| //============================ Structs ===========================
|
|
|
| -ResumeUploadResponse::ResumeUploadResponse(GDataErrorCode code,
|
| +ResumeUploadResponse::ResumeUploadResponse(DriveErrorCode code,
|
| int64 start_range_received,
|
| int64 end_range_received)
|
| : code(code),
|
| @@ -331,14 +331,14 @@ void DownloadFileOperation::OnURLFetchDownloadData(
|
| }
|
|
|
| void DownloadFileOperation::ProcessURLFetchResults(const URLFetcher* source) {
|
| - GDataErrorCode code = GetErrorCode(source);
|
| + DriveErrorCode code = GetErrorCode(source);
|
|
|
| // Take over the ownership of the the downloaded temp file.
|
| FilePath temp_file;
|
| if (code == HTTP_SUCCESS &&
|
| !source->GetResponseAsFilePath(true, // take_ownership
|
| &temp_file)) {
|
| - code = GDATA_FILE_ERROR;
|
| + code = DRIVE_FILE_ERROR;
|
| }
|
|
|
| if (!download_action_callback_.is_null())
|
| @@ -346,7 +346,7 @@ void DownloadFileOperation::ProcessURLFetchResults(const URLFetcher* source) {
|
| OnProcessURLFetchResultsComplete(code == HTTP_SUCCESS);
|
| }
|
|
|
| -void DownloadFileOperation::RunCallbackOnPrematureFailure(GDataErrorCode code) {
|
| +void DownloadFileOperation::RunCallbackOnPrematureFailure(DriveErrorCode code) {
|
| if (!download_action_callback_.is_null())
|
| download_action_callback_.Run(code, document_url_, FilePath());
|
| }
|
| @@ -565,7 +565,7 @@ bool AuthorizeAppsOperation::GetContentData(std::string* upload_content_type,
|
| }
|
|
|
| void AuthorizeAppsOperation::ParseResponse(
|
| - GDataErrorCode fetch_error_code,
|
| + DriveErrorCode fetch_error_code,
|
| const std::string& data) {
|
| // Parse entry XML.
|
| XmlReader xml_reader;
|
| @@ -708,7 +708,7 @@ GURL InitiateUploadOperation::GetURL() const {
|
|
|
| void InitiateUploadOperation::ProcessURLFetchResults(
|
| const URLFetcher* source) {
|
| - GDataErrorCode code = GetErrorCode(source);
|
| + DriveErrorCode code = GetErrorCode(source);
|
|
|
| std::string upload_location;
|
| if (code == HTTP_SUCCESS) {
|
| @@ -731,7 +731,7 @@ void InitiateUploadOperation::NotifySuccessToOperationRegistry() {
|
| }
|
|
|
| void InitiateUploadOperation::RunCallbackOnPrematureFailure(
|
| - GDataErrorCode code) {
|
| + DriveErrorCode code) {
|
| if (!callback_.is_null())
|
| callback_.Run(code, GURL());
|
| }
|
| @@ -809,7 +809,7 @@ GURL ResumeUploadOperation::GetURL() const {
|
| }
|
|
|
| void ResumeUploadOperation::ProcessURLFetchResults(const URLFetcher* source) {
|
| - GDataErrorCode code = GetErrorCode(source);
|
| + DriveErrorCode code = GetErrorCode(source);
|
| net::HttpResponseHeaders* hdrs = source->GetResponseHeaders();
|
| int64 start_range_received = -1;
|
| int64 end_range_received = -1;
|
| @@ -884,7 +884,7 @@ void ResumeUploadOperation::NotifySuccessToOperationRegistry() {
|
| NotifySuspend();
|
| }
|
|
|
| -void ResumeUploadOperation::RunCallbackOnPrematureFailure(GDataErrorCode code) {
|
| +void ResumeUploadOperation::RunCallbackOnPrematureFailure(DriveErrorCode code) {
|
| scoped_ptr<DocumentEntry> entry;
|
| if (!callback_.is_null())
|
| callback_.Run(ResumeUploadResponse(code, 0, 0), entry.Pass());
|
| @@ -1001,7 +1001,7 @@ GURL GetContactPhotoOperation::GetURL() const {
|
|
|
| void GetContactPhotoOperation::ProcessURLFetchResults(
|
| const net::URLFetcher* source) {
|
| - GDataErrorCode code = static_cast<GDataErrorCode>(source->GetResponseCode());
|
| + DriveErrorCode code = static_cast<DriveErrorCode>(source->GetResponseCode());
|
| scoped_ptr<std::string> data(new std::string);
|
| source->GetResponseAsString(data.get());
|
| callback_.Run(code, data.Pass());
|
| @@ -1009,7 +1009,7 @@ void GetContactPhotoOperation::ProcessURLFetchResults(
|
| }
|
|
|
| void GetContactPhotoOperation::RunCallbackOnPrematureFailure(
|
| - GDataErrorCode code) {
|
| + DriveErrorCode code) {
|
| scoped_ptr<std::string> data(new std::string);
|
| callback_.Run(code, data.Pass());
|
| }
|
|
|