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

Unified Diff: chrome/browser/policy/device_token_fetcher.cc

Issue 8499021: UserPolicyCache only becomes ready after policy has been fetched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 9 years, 1 month 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/policy/device_token_fetcher.cc
diff --git a/chrome/browser/policy/device_token_fetcher.cc b/chrome/browser/policy/device_token_fetcher.cc
index bc565b05f80b567ce9113652048aa5151a9a8b96..e96b4fb424be0da391b2a7d808ba1bb8cd42401d 100644
--- a/chrome/browser/policy/device_token_fetcher.cc
+++ b/chrome/browser/policy/device_token_fetcher.cc
@@ -224,6 +224,10 @@ void DeviceTokenFetcher::SetState(FetcherState state) {
scheduler_->PostDelayedWork(
base::Bind(&DeviceTokenFetcher::DoWork, base::Unretained(this)), delay);
}
+
+ // Inform the cache if a token fetch attempt has failed.
+ if (state_ != STATE_INACTIVE && state_ != STATE_TOKEN_AVAILABLE)
+ cache_->SetFetchingDone();
}
void DeviceTokenFetcher::DoWork() {

Powered by Google App Engine
This is Rietveld 408576698