| Index: chrome/browser/policy/user_cloud_policy_store.cc
|
| diff --git a/chrome/browser/policy/user_cloud_policy_store.cc b/chrome/browser/policy/user_cloud_policy_store.cc
|
| index 6a9b73f8e0884172ebc6629118a9dbd9a72e8498..9a44dc33f4c5b9aae7e8eec859100631d56af02c 100644
|
| --- a/chrome/browser/policy/user_cloud_policy_store.cc
|
| +++ b/chrome/browser/policy/user_cloud_policy_store.cc
|
| @@ -188,7 +188,6 @@ void UserCloudPolicyStore::InstallLoadedPolicyAfterValidation(
|
| DVLOG(1) << "Device ID: " << validator->policy_data()->device_id();
|
|
|
| InstallPolicy(validator->policy_data().Pass(), validator->payload().Pass());
|
| - FilterDisallowedPolicies();
|
| status_ = STATUS_OK;
|
| NotifyStoreLoaded();
|
| }
|
| @@ -215,8 +214,9 @@ void UserCloudPolicyStore::Validate(
|
| SigninManager* signin = SigninManagerFactory::GetForProfileIfExists(profile_);
|
| if (signin) {
|
| std::string username = signin->GetAuthenticatedUsername();
|
| - DCHECK(!username.empty());
|
| - validator->ValidateUsername(username);
|
| + // Validate the username if the user is signed in.
|
| + if (!username.empty())
|
| + validator->ValidateUsername(username);
|
| }
|
|
|
| if (validate_in_background) {
|
| @@ -247,17 +247,8 @@ void UserCloudPolicyStore::StorePolicyAfterValidation(
|
| base::Bind(&StorePolicyToDiskOnFileThread,
|
| backing_file_path_, *validator->policy()));
|
| InstallPolicy(validator->policy_data().Pass(), validator->payload().Pass());
|
| - FilterDisallowedPolicies();
|
| status_ = STATUS_OK;
|
| NotifyStoreLoaded();
|
| }
|
|
|
| -void UserCloudPolicyStore::FilterDisallowedPolicies() {
|
| - // We don't yet allow setting SyncDisabled in desktop cloud policy, because
|
| - // it causes the user to be signed out which then removes the cloud policy.
|
| - // TODO(atwilson): Remove this once we support signing in with sync disabled
|
| - // (http://crbug.com/166148).
|
| - policy_map_.Erase(key::kSyncDisabled);
|
| -}
|
| -
|
| } // namespace policy
|
|
|