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

Unified Diff: chrome/browser/supervised_user/child_accounts/child_account_service.h

Issue 880483002: ChildAccountService: periodically re-fetch parent info; retry on failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
Index: chrome/browser/supervised_user/child_accounts/child_account_service.h
diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service.h b/chrome/browser/supervised_user/child_accounts/child_account_service.h
index 0c2fb1c1cf0824648ebce91ff54aaaf6d473f1ea..4a1519670d151ea72d94199ac39cda71cf43e7db 100644
--- a/chrome/browser/supervised_user/child_accounts/child_account_service.h
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service.h
@@ -70,6 +70,10 @@ class ChildAccountService : public KeyedService,
const std::vector<FamilyInfoFetcher::FamilyMember>& members) override;
void OnFailure(FamilyInfoFetcher::ErrorCode error) override;
+ void StartFetchingFamilyInfo();
+ void CancelFetchingFamilyInfo();
+ void ScheduleNextFamilyInfoUpdate(base::TimeDelta delay);
+
void StartFetchingServiceFlags();
void CancelFetchingServiceFlags();
void OnFlagsFetched(AccountServiceFlagFetcher::ResultCode,
@@ -101,6 +105,9 @@ class ChildAccountService : public KeyedService,
net::BackoffEntry flag_fetch_backoff_;
scoped_ptr<FamilyInfoFetcher> family_fetcher_;
+ // If fetching the family info fails, retry with exponential backoff.
+ base::OneShotTimer<ChildAccountService> family_fetch_timer_;
+ net::BackoffEntry family_fetch_backoff_;
base::WeakPtrFactory<ChildAccountService> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698