diff options
author | pastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-21 10:41:57 +0000 |
---|---|---|
committer | pastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-21 10:41:57 +0000 |
commit | 7a29b34c138135c001d2c0259d938429c43b691d (patch) | |
tree | f74a184cee99b9fcef4c96512fcadb697a2913ca /chrome/browser/policy/cloud_policy_controller.h | |
parent | 997e8adf60e73730bd578c6dd46a1e73f3777402 (diff) | |
download | chromium_src-7a29b34c138135c001d2c0259d938429c43b691d.zip chromium_src-7a29b34c138135c001d2c0259d938429c43b691d.tar.gz chromium_src-7a29b34c138135c001d2c0259d938429c43b691d.tar.bz2 |
Added a new states to the CloudPolicyCotroller - STATE_TOKEN_ERROR, STATE_TOKEN_UNMANAGED.
This STATE_TOKEN_ERROR is entered if the DMServer suffers some form of amnesia and tells us that the device token is unknown just after it gave it to us. In this case we will refetch the token but instead of doing this full steam
we will be gracefully backing off with time. Also whenever we get a response that a policy is not present for a device we will accept this an OK state and try to refetch only after the regular policy update interval.
BUG=76507
TEST=Change the testserver response of policy fetch request to DEVICE_MANAGEMENT_NOT_SUPPORTED and observe that the server is not DoSed with policy requests.
Review URL: http://codereview.chromium.org/6670088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78868 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy/cloud_policy_controller.h')
-rw-r--r-- | chrome/browser/policy/cloud_policy_controller.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/policy/cloud_policy_controller.h b/chrome/browser/policy/cloud_policy_controller.h index 42bb1eb..1ded702 100644 --- a/chrome/browser/policy/cloud_policy_controller.h +++ b/chrome/browser/policy/cloud_policy_controller.h @@ -61,6 +61,10 @@ class CloudPolicyController enum ControllerState { // The controller is initializing, policy information not yet available. STATE_TOKEN_UNAVAILABLE, + // The device is not managed. Should retry fetching the token after delay. + STATE_TOKEN_UNMANAGED, + // The token is not valid and should be refetched with exponential back-off. + STATE_TOKEN_ERROR, // The token is valid, but policy is yet to be fetched. STATE_TOKEN_VALID, // Policy information is available and valid. |