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

Unified Diff: components/signin/core/browser/gaia_cookie_manager_service.cc

Issue 2704403002: Avoid re-starting a ExternalCCResultFetcher if a previous has finished or timed out. (Closed)
Patch Set: Clean-up the transient state before scheduling a new ExternalCcResultFetcher Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/gaia_cookie_manager_service.cc
diff --git a/components/signin/core/browser/gaia_cookie_manager_service.cc b/components/signin/core/browser/gaia_cookie_manager_service.cc
index 28f30f1d2ffab1aa02322776bfcc0253688d930f..18cccf82514e699035fc0c24a4e18ac2f5af8871 100644
--- a/components/signin/core/browser/gaia_cookie_manager_service.cc
+++ b/components/signin/core/browser/gaia_cookie_manager_service.cc
@@ -130,6 +130,7 @@ GaiaCookieManagerService::ExternalCcResultFetcher::GetExternalCcResult() {
}
void GaiaCookieManagerService::ExternalCcResultFetcher::Start() {
+ DCHECK(!helper_->external_cc_result_fetched_);
m_external_cc_result_start_time_ = base::Time::Now();
CleanupTransientState();
@@ -195,6 +196,8 @@ void GaiaCookieManagerService::ExternalCcResultFetcher::
void GaiaCookieManagerService::ExternalCcResultFetcher::
OnGetCheckConnectionInfoError(const GoogleServiceAuthError& error) {
+ CleanupTransientState();
+
Roger Tawa OOO till Jul 10th 2017/02/24 17:20:15 I would leave the call to CleanupTransientState()
msarda 2017/03/03 14:25:00 I guess it all depends on what we want the behavio
if (++helper_->fetcher_retries_ < kMaxFetcherRetries &&
error.IsTransientError()) {
helper_->fetcher_backoff_.InformOfRequest(false);
@@ -204,7 +207,6 @@ void GaiaCookieManagerService::ExternalCcResultFetcher::
return;
}
- CleanupTransientState();
GetCheckConnectionInfoCompleted(false);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698