summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authoratwilson <atwilson@chromium.org>2016-02-24 06:30:55 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-24 14:32:26 +0000
commit01a589c605a9ead2754a51a5ef2c916361c6be0d (patch)
tree0704434a00a8abb281d674420601c33f75a90557 /chromeos
parentc6f9c49b8221a2002ba771a3f108514a6c506ff0 (diff)
downloadchromium_src-01a589c605a9ead2754a51a5ef2c916361c6be0d.zip
chromium_src-01a589c605a9ead2754a51a5ef2c916361c6be0d.tar.gz
chromium_src-01a589c605a9ead2754a51a5ef2c916361c6be0d.tar.bz2
Reland: 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@chromium.org Review URL: https://codereview.chromium.org/1727413002 Cr-Commit-Position: refs/heads/master@{#377288}
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/chromeos_switches.cc5
-rw-r--r--chromeos/chromeos_switches.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/chromeos/chromeos_switches.cc b/chromeos/chromeos_switches.cc
index 249cfab..afb9b83f 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 4d7a5de..ee53d4e 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[];