From b5eef9438be6954840df6c39f518ff042815ac7f Mon Sep 17 00:00:00 2001 From: atwilson Date: Fri, 19 Feb 2016 09:49:47 -0800 Subject: No longer start up profile if there was an error fetching policy. Changed UserCloudPolicyManagerChromeOS to no longer complete profile initialization if there is an error fetching policy. Instead, we shutdown the user and force a policy load the next time we try to startup that user. BUG=532317 TBR=vitalybuka Review URL: https://codereview.chromium.org/1608533002 Cr-Commit-Position: refs/heads/master@{#376484} --- chromeos/chromeos_switches.cc | 5 +++++ chromeos/chromeos_switches.h | 1 + 2 files changed, 6 insertions(+) (limited to 'chromeos') diff --git a/chromeos/chromeos_switches.cc b/chromeos/chromeos_switches.cc index 7958d31..b148ac7 100644 --- a/chromeos/chromeos_switches.cc +++ b/chromeos/chromeos_switches.cc @@ -12,6 +12,11 @@ namespace chromeos { namespace switches { +// If this flag is passed, failed policy fetches will not cause profile +// initialization to fail. This is useful for tests because it means that +// tests don't have to mock out the policy infrastructure. +const char kAllowFailedPolicyFetchForTest[] = + "allow-failed-policy-fetch-for-test"; // Allows remote attestation (RA) in dev mode for testing purpose. Usually RA // is disabled in dev mode because it will always fail. However, there are cases diff --git a/chromeos/chromeos_switches.h b/chromeos/chromeos_switches.h index b4782ec..87e7a4c 100644 --- a/chromeos/chromeos_switches.h +++ b/chromeos/chromeos_switches.h @@ -21,6 +21,7 @@ namespace switches { // see chromeos::LoginUtil::GetOffTheRecordCommandLine().) // Please keep alphabetized. +CHROMEOS_EXPORT extern const char kAllowFailedPolicyFetchForTest[]; CHROMEOS_EXPORT extern const char kAllowRAInDevMode[]; CHROMEOS_EXPORT extern const char kAppOemManifestFile[]; CHROMEOS_EXPORT extern const char kArtifactsDir[]; -- cgit v1.1