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

Unified Diff: chrome/browser/google_apis/base_requests.cc

Issue 23944014: Remove unused parameter from a google_api::Request method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/google_apis/base_requests.h ('k') | chrome/browser/google_apis/gdata_contacts_requests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/base_requests.cc
diff --git a/chrome/browser/google_apis/base_requests.cc b/chrome/browser/google_apis/base_requests.cc
index 607c2651d30d47ee00657e2923e4dcd0a6a770c4..1336eec66bade56ab3424dc55f431c6ee457350f 100644
--- a/chrome/browser/google_apis/base_requests.cc
+++ b/chrome/browser/google_apis/base_requests.cc
@@ -248,7 +248,7 @@ base::TaskRunner* UrlFetchRequestBase::blocking_task_runner() const {
return sender_->blocking_task_runner();
}
-void UrlFetchRequestBase::OnProcessURLFetchResultsComplete(bool result) {
+void UrlFetchRequestBase::OnProcessURLFetchResultsComplete() {
sender_->RequestFinished(this);
}
@@ -295,10 +295,8 @@ EntryActionRequest::EntryActionRequest(RequestSender* sender,
EntryActionRequest::~EntryActionRequest() {}
void EntryActionRequest::ProcessURLFetchResults(const URLFetcher* source) {
- GDataErrorCode code = GetErrorCode(source);
- callback_.Run(code);
- const bool success = true;
- OnProcessURLFetchResultsComplete(success);
+ callback_.Run(GetErrorCode(source));
+ OnProcessURLFetchResultsComplete();
}
void EntryActionRequest::RunCallbackOnPrematureFailure(GDataErrorCode code) {
@@ -343,8 +341,7 @@ void GetDataRequest::ProcessURLFetchResults(const URLFetcher* source) {
break;
default:
RunCallbackOnPrematureFailure(fetch_error_code);
- const bool success = false;
- OnProcessURLFetchResultsComplete(success);
+ OnProcessURLFetchResultsComplete();
break;
}
}
@@ -358,22 +355,11 @@ void GetDataRequest::OnDataParsed(GDataErrorCode fetch_error_code,
scoped_ptr<base::Value> value) {
DCHECK(CalledOnValidThread());
- bool success = true;
- if (!value.get()) {
+ if (!value.get())
fetch_error_code = GDATA_PARSE_ERROR;
- success = false;
- }
-
- RunCallbackOnSuccess(fetch_error_code, value.Pass());
- DCHECK(!value.get());
- OnProcessURLFetchResultsComplete(success);
-}
-
-void GetDataRequest::RunCallbackOnSuccess(GDataErrorCode fetch_error_code,
- scoped_ptr<base::Value> value) {
- DCHECK(CalledOnValidThread());
callback_.Run(fetch_error_code, value.Pass());
+ OnProcessURLFetchResultsComplete();
}
//========================= InitiateUploadRequestBase ========================
@@ -407,7 +393,7 @@ void InitiateUploadRequestBase::ProcessURLFetchResults(
}
callback_.Run(code, GURL(upload_location));
- OnProcessURLFetchResultsComplete(code == HTTP_SUCCESS);
+ OnProcessURLFetchResultsComplete();
}
void InitiateUploadRequestBase::RunCallbackOnPrematureFailure(
@@ -500,7 +486,7 @@ void UploadRangeRequestBase::ProcessURLFetchResults(
end_position_received),
scoped_ptr<base::Value>());
- OnProcessURLFetchResultsComplete(true);
+ OnProcessURLFetchResultsComplete();
} else if (code == HTTP_CREATED || code == HTTP_SUCCESS) {
// The upload is successfully done. Parse the response which should be
// the entry's metadata.
@@ -516,7 +502,7 @@ void UploadRangeRequestBase::ProcessURLFetchResults(
// Failed to upload. Run callbacks to notify the error.
OnRangeRequestComplete(
UploadRangeResponse(code, -1, -1), scoped_ptr<base::Value>());
- OnProcessURLFetchResultsComplete(false);
+ OnProcessURLFetchResultsComplete();
}
}
@@ -526,7 +512,7 @@ void UploadRangeRequestBase::OnDataParsed(GDataErrorCode code,
DCHECK(code == HTTP_CREATED || code == HTTP_SUCCESS);
OnRangeRequestComplete(UploadRangeResponse(code, -1, -1), value.Pass());
- OnProcessURLFetchResultsComplete(true);
+ OnProcessURLFetchResultsComplete();
}
void UploadRangeRequestBase::RunCallbackOnPrematureFailure(
@@ -690,7 +676,7 @@ void DownloadFileRequestBase::ProcessURLFetchResults(const URLFetcher* source) {
}
download_action_callback_.Run(code, temp_file);
- OnProcessURLFetchResultsComplete(code == HTTP_SUCCESS);
+ OnProcessURLFetchResultsComplete();
}
void DownloadFileRequestBase::RunCallbackOnPrematureFailure(
« no previous file with comments | « chrome/browser/google_apis/base_requests.h ('k') | chrome/browser/google_apis/gdata_contacts_requests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698