Chromium Code Reviews| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 // List of policies that are considered only if the user is part of a AD domain. | 76 // List of policies that are considered only if the user is part of a AD domain. |
| 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 |
|
Nico
2015/07/08 02:45:38
Add "// TODO: Remove pragma once http://llvm.org/P
dcheng
2015/07/08 04:35:32
Done.
I also had to go through some contortions t
| |
| 87 #pragma clang diagnostic push | |
| 88 #pragma clang diagnostic ignored "-Wmissing-braces" | |
| 87 // The GUID of the registry settings group policy extension. | 89 // The GUID of the registry settings group policy extension. |
| 88 GUID kRegistrySettingsCSEGUID = REGISTRY_EXTENSION_GUID; | 90 GUID kRegistrySettingsCSEGUID = REGISTRY_EXTENSION_GUID; |
| 91 #pragma clang diagnostic pop | |
| 89 | 92 |
| 90 // The list of possible errors that can occur while collecting information about | 93 // The list of possible errors that can occur while collecting information about |
| 91 // the current enterprise environment. | 94 // the current enterprise environment. |
| 92 // This enum is used to define the buckets for an enumerated UMA histogram. | 95 // This enum is used to define the buckets for an enumerated UMA histogram. |
| 93 // Hence, | 96 // Hence, |
| 94 // (a) existing enumerated constants should never be deleted or reordered, and | 97 // (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. | 98 // (b) new constants should only be appended at the end of the enumeration. |
| 96 enum DomainCheckErrors { | 99 enum DomainCheckErrors { |
| 97 DOMAIN_CHECK_ERROR_GET_JOIN_INFO = 0, | 100 DOMAIN_CHECK_ERROR_GET_JOIN_INFO = 0, |
| 98 DOMAIN_CHECK_ERROR_DS_BIND = 1, | 101 DOMAIN_CHECK_ERROR_DS_BIND = 1, |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 684 | 687 |
| 685 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { | 688 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { |
| 686 DCHECK(object == user_policy_changed_event_.handle() || | 689 DCHECK(object == user_policy_changed_event_.handle() || |
| 687 object == machine_policy_changed_event_.handle()) | 690 object == machine_policy_changed_event_.handle()) |
| 688 << "unexpected object signaled policy reload, obj = " | 691 << "unexpected object signaled policy reload, obj = " |
| 689 << std::showbase << std::hex << object; | 692 << std::showbase << std::hex << object; |
| 690 Reload(false); | 693 Reload(false); |
| 691 } | 694 } |
| 692 | 695 |
| 693 } // namespace policy | 696 } // namespace policy |
| OLD | NEW |