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

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

Issue 9599009: Fix infinite refresh of device policy when the TPM gets out of sync with the stateful partition. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added unit test Created 8 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
Index: chrome/browser/policy/cloud_policy_controller.cc
diff --git a/chrome/browser/policy/cloud_policy_controller.cc b/chrome/browser/policy/cloud_policy_controller.cc
index 6fe6ee7f49cfa951bd85e7372c8244855e99d7a6..d3d8b9615990d99dd77cd5a16ce85fd5ad662abc 100644
--- a/chrome/browser/policy/cloud_policy_controller.cc
+++ b/chrome/browser/policy/cloud_policy_controller.cc
@@ -185,8 +185,10 @@ void CloudPolicyController::OnPolicyFetchCompleted(
policy_response.response(0));
if (!fetch_response.has_error_code() ||
fetch_response.error_code() == dm_protocol::POLICY_FETCH_SUCCESS) {
- cache_->SetPolicy(fetch_response);
- SetState(STATE_POLICY_VALID);
+ if (cache_->SetPolicy(fetch_response))
+ SetState(STATE_POLICY_VALID);
+ else
+ SetState(STATE_POLICY_ERROR);
} else {
UMA_HISTOGRAM_ENUMERATION(kMetricPolicy,
kMetricPolicyFetchBadResponse,
« no previous file with comments | « chrome/browser/policy/cloud_policy_cache_base.h ('k') | chrome/browser/policy/cloud_policy_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698