0

Improve GaiaAuthFetcher's API for its subclasses.

As |GaiaAuthFetcher::CreateAndStartGaiaFetcher| can already be
specialized by a subclass, |GaiaAuthFetcher::CancelRequest| should as
well, to allow specialized fetchers to be cancelled.

BUG=495597

Review URL: https://codereview.chromium.org/1153293004

Cr-Commit-Position: refs/heads/master@{#333045}
This commit is contained in:
bzanotti
2015-06-05 07:43:53 -07:00
committed by Commit bot
parent 83caea5329
commit 6b49663d72
2 changed files with 7 additions and 1 deletions

@ -224,6 +224,10 @@ bool GaiaAuthFetcher::HasPendingFetch() {
return fetch_pending_;
}
void GaiaAuthFetcher::SetPendingFetch(bool pending_fetch) {
fetch_pending_ = pending_fetch;
}
void GaiaAuthFetcher::CancelRequest() {
fetcher_.reset();
fetch_pending_ = false;

@ -224,7 +224,7 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
bool HasPendingFetch();
// Stop any URL fetches in progress.
void CancelRequest();
virtual void CancelRequest();
// From a URLFetcher result, generate an appropriate error.
// From the API documentation, both IssueAuthToken and ClientLogin have
@ -255,6 +255,8 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
const net::URLRequestStatus& status,
int response_code);
void SetPendingFetch(bool pending_fetch);
private:
// ClientLogin body constants that don't change
static const char kCookiePersistence[];