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

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

Issue 12088040: Add a SigninAllowed policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add tests and link UpdateLogin to kSigninAllowed pref. Created 7 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/configuration_policy_handler.cc
diff --git a/chrome/browser/policy/configuration_policy_handler.cc b/chrome/browser/policy/configuration_policy_handler.cc
index 5587cae14c2c6582bdbdd08633edf7282a5e7b15..ea01c560c001c090bffbf60c52fe1b7bc26b52c4 100644
--- a/chrome/browser/policy/configuration_policy_handler.cc
+++ b/chrome/browser/policy/configuration_policy_handler.cc
@@ -553,6 +553,23 @@ void SyncPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
prefs->SetValue(prefs::kSyncManaged, value->DeepCopy());
}
+// SigninPolicyHandler implementation ------------------------------------------
+
+SigninPolicyHandler::SigninPolicyHandler()
+ : TypeCheckingPolicyHandler(key::kSigninAllowed,
+ Value::TYPE_BOOLEAN) {
+}
+
+SigninPolicyHandler::~SigninPolicyHandler() {
+}
+
+void SigninPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
+ PrefValueMap* prefs) {
+ const Value* value = policies.GetValue(policy_name());
+ bool signin_allowed;
+ if (value && value->GetAsBoolean(&signin_allowed))
Andrew T Wilson (Slow) 2013/02/07 10:08:11 This is fine with me, but I wonder if this boilerp
Adrian Kuegel 2013/02/07 11:09:21 Yes, I will do that. I did this part just in the s
+ prefs->SetValue(prefs::kSigninAllowed, value->DeepCopy());
+}
// AutofillPolicyHandler implementation ----------------------------------------

Powered by Google App Engine
This is Rietveld 408576698