| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/policy/core/common/policy_loader_win.h" | 5 #include "components/policy/core/common/policy_loader_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <lm.h> // For limits. | 8 #include <lm.h> // For limits. |
| 9 #include <ntdsapi.h> // For Ds[Un]Bind | 9 #include <ntdsapi.h> // For Ds[Un]Bind |
| 10 #include <rpc.h> // For struct GUID | 10 #include <rpc.h> // For struct GUID |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // Please document any new additions in policy_templates.json! | 77 // Please document any new additions in policy_templates.json! |
| 78 const char* kInsecurePolicies[] = { | 78 const char* kInsecurePolicies[] = { |
| 79 key::kMetricsReportingEnabled, | 79 key::kMetricsReportingEnabled, |
| 80 key::kDefaultSearchProviderEnabled, | 80 key::kDefaultSearchProviderEnabled, |
| 81 key::kHomepageIsNewTabPage, | 81 key::kHomepageIsNewTabPage, |
| 82 key::kHomepageLocation, | 82 key::kHomepageLocation, |
| 83 key::kRestoreOnStartup, | 83 key::kRestoreOnStartup, |
| 84 key::kRestoreOnStartupURLs | 84 key::kRestoreOnStartupURLs |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 #pragma warning(push) |
| 88 #pragma warning(disable: 4068) // unknown pragmas |
| 89 // TODO(dcheng): Remove pragma once http://llvm.org/PR24007 is fixed. |
| 90 #pragma clang diagnostic ignored "-Wmissing-braces" |
| 87 // The GUID of the registry settings group policy extension. | 91 // The GUID of the registry settings group policy extension. |
| 88 GUID kRegistrySettingsCSEGUID = REGISTRY_EXTENSION_GUID; | 92 GUID kRegistrySettingsCSEGUID = REGISTRY_EXTENSION_GUID; |
| 93 #pragma warning(pop) |
| 89 | 94 |
| 90 // The list of possible errors that can occur while collecting information about | 95 // The list of possible errors that can occur while collecting information about |
| 91 // the current enterprise environment. | 96 // the current enterprise environment. |
| 92 // This enum is used to define the buckets for an enumerated UMA histogram. | 97 // This enum is used to define the buckets for an enumerated UMA histogram. |
| 93 // Hence, | 98 // Hence, |
| 94 // (a) existing enumerated constants should never be deleted or reordered, and | 99 // (a) existing enumerated constants should never be deleted or reordered, and |
| 95 // (b) new constants should only be appended at the end of the enumeration. | 100 // (b) new constants should only be appended at the end of the enumeration. |
| 96 enum DomainCheckErrors { | 101 enum DomainCheckErrors { |
| 97 DOMAIN_CHECK_ERROR_GET_JOIN_INFO = 0, | 102 DOMAIN_CHECK_ERROR_GET_JOIN_INFO = 0, |
| 98 DOMAIN_CHECK_ERROR_DS_BIND = 1, | 103 DOMAIN_CHECK_ERROR_DS_BIND = 1, |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 | 689 |
| 685 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { | 690 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { |
| 686 DCHECK(object == user_policy_changed_event_.handle() || | 691 DCHECK(object == user_policy_changed_event_.handle() || |
| 687 object == machine_policy_changed_event_.handle()) | 692 object == machine_policy_changed_event_.handle()) |
| 688 << "unexpected object signaled policy reload, obj = " | 693 << "unexpected object signaled policy reload, obj = " |
| 689 << std::showbase << std::hex << object; | 694 << std::showbase << std::hex << object; |
| 690 Reload(false); | 695 Reload(false); |
| 691 } | 696 } |
| 692 | 697 |
| 693 } // namespace policy | 698 } // namespace policy |
| OLD | NEW |