| Index: components/policy/core/common/policy_loader_win.cc
|
| diff --git a/components/policy/core/common/policy_loader_win.cc b/components/policy/core/common/policy_loader_win.cc
|
| index 1b190f4be1af9133e133299ded054d56b077f5cd..3f614dfb48737e050bf29942b63923b160bb8c3c 100644
|
| --- a/components/policy/core/common/policy_loader_win.cc
|
| +++ b/components/policy/core/common/policy_loader_win.cc
|
| @@ -390,6 +390,10 @@ scoped_ptr<PolicyBundle> PolicyLoaderWin::Load() {
|
| { POLICY_SCOPE_USER, HKEY_CURRENT_USER },
|
| };
|
|
|
| + bool is_enterprise = base::win::IsEnrolledToDomain();
|
| + VLOG(1) << "Reading policy from the registry is "
|
| + << (is_enterprise ? "enabled." : "disabled.");
|
| +
|
| // Load policy data for the different scopes/levels and merge them.
|
| scoped_ptr<PolicyBundle> bundle(new PolicyBundle());
|
| PolicyMap* chrome_policy =
|
| @@ -416,9 +420,9 @@ scoped_ptr<PolicyBundle> PolicyLoaderWin::Load() {
|
| // timeout on it more aggressively. For now, there's no justification for
|
| // the additional effort this would introduce.
|
|
|
| - if (!ReadPolicyFromGPO(scope, &gpo_dict, &status)) {
|
| - VLOG(1) << "Failed to read GPO files for " << scope
|
| - << " falling back to registry.";
|
| + if (is_enterprise || !ReadPolicyFromGPO(scope, &gpo_dict, &status)) {
|
| + VLOG_IF(1, !is_enterprise) << "Failed to read GPO files for " << scope
|
| + << " falling back to registry.";
|
| gpo_dict.ReadRegistry(kScopes[i].hive, chrome_policy_key_);
|
| }
|
|
|
|
|