| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // AppliedGPOListProvider implementation that calls actual Windows APIs. | 285 // AppliedGPOListProvider implementation that calls actual Windows APIs. |
| 286 class WinGPOListProvider : public AppliedGPOListProvider { | 286 class WinGPOListProvider : public AppliedGPOListProvider { |
| 287 public: | 287 public: |
| 288 virtual ~WinGPOListProvider() {} | 288 virtual ~WinGPOListProvider() {} |
| 289 | 289 |
| 290 // AppliedGPOListProvider: | 290 // AppliedGPOListProvider: |
| 291 virtual DWORD GetAppliedGPOList(DWORD flags, | 291 virtual DWORD GetAppliedGPOList(DWORD flags, |
| 292 LPCTSTR machine_name, | 292 LPCTSTR machine_name, |
| 293 PSID sid_user, | 293 PSID sid_user, |
| 294 GUID* extension_guid, | 294 GUID* extension_guid, |
| 295 PGROUP_POLICY_OBJECT* gpo_list) OVERRIDE { | 295 PGROUP_POLICY_OBJECT* gpo_list) override { |
| 296 return ::GetAppliedGPOList(flags, machine_name, sid_user, extension_guid, | 296 return ::GetAppliedGPOList(flags, machine_name, sid_user, extension_guid, |
| 297 gpo_list); | 297 gpo_list); |
| 298 } | 298 } |
| 299 | 299 |
| 300 virtual BOOL FreeGPOList(PGROUP_POLICY_OBJECT gpo_list) OVERRIDE { | 300 virtual BOOL FreeGPOList(PGROUP_POLICY_OBJECT gpo_list) override { |
| 301 return ::FreeGPOList(gpo_list); | 301 return ::FreeGPOList(gpo_list); |
| 302 } | 302 } |
| 303 }; | 303 }; |
| 304 | 304 |
| 305 // The default windows GPO list provider used for PolicyLoaderWin. | 305 // The default windows GPO list provider used for PolicyLoaderWin. |
| 306 static base::LazyInstance<WinGPOListProvider> g_win_gpo_list_provider = | 306 static base::LazyInstance<WinGPOListProvider> g_win_gpo_list_provider = |
| 307 LAZY_INSTANCE_INITIALIZER; | 307 LAZY_INSTANCE_INITIALIZER; |
| 308 | 308 |
| 309 // Parses |gpo_dict| according to |schema| and writes the resulting policy | 309 // Parses |gpo_dict| according to |schema| and writes the resulting policy |
| 310 // settings to |policy| for the given |scope| and |level|. | 310 // settings to |policy| for the given |scope| and |level|. |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 "PolicyLoaderWin_OnObjectSignaled")); | 687 "PolicyLoaderWin_OnObjectSignaled")); |
| 688 | 688 |
| 689 DCHECK(object == user_policy_changed_event_.handle() || | 689 DCHECK(object == user_policy_changed_event_.handle() || |
| 690 object == machine_policy_changed_event_.handle()) | 690 object == machine_policy_changed_event_.handle()) |
| 691 << "unexpected object signaled policy reload, obj = " | 691 << "unexpected object signaled policy reload, obj = " |
| 692 << std::showbase << std::hex << object; | 692 << std::showbase << std::hex << object; |
| 693 Reload(false); | 693 Reload(false); |
| 694 } | 694 } |
| 695 | 695 |
| 696 } // namespace policy | 696 } // namespace policy |
| OLD | NEW |