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:
google_apis/gaia
@ -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[];
|
||||
|
Reference in New Issue
Block a user