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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 // Load Chrome policy. | 485 // Load Chrome policy. |
486 LoadChromePolicy(&gpo_dict, POLICY_LEVEL_MANDATORY, scope, chrome_policy); | 486 LoadChromePolicy(&gpo_dict, POLICY_LEVEL_MANDATORY, scope, chrome_policy); |
487 LoadChromePolicy(recommended_dict.get(), POLICY_LEVEL_RECOMMENDED, scope, | 487 LoadChromePolicy(recommended_dict.get(), POLICY_LEVEL_RECOMMENDED, scope, |
488 chrome_policy); | 488 chrome_policy); |
489 | 489 |
490 // Load 3rd-party policy. | 490 // Load 3rd-party policy. |
491 if (third_party_dict) | 491 if (third_party_dict) |
492 Load3rdPartyPolicy(third_party_dict.get(), scope, bundle.get()); | 492 Load3rdPartyPolicy(third_party_dict.get(), scope, bundle.get()); |
493 } | 493 } |
494 | 494 |
495 return bundle.Pass(); | 495 return bundle; |
496 } | 496 } |
497 | 497 |
498 bool PolicyLoaderWin::ReadPRegFile(const base::FilePath& preg_file, | 498 bool PolicyLoaderWin::ReadPRegFile(const base::FilePath& preg_file, |
499 RegistryDict* policy, | 499 RegistryDict* policy, |
500 PolicyLoadStatusSample* status) { | 500 PolicyLoadStatusSample* status) { |
501 // The following deals with the minor annoyance that Wow64 FS redirection | 501 // The following deals with the minor annoyance that Wow64 FS redirection |
502 // might need to be turned off: This is the case if running as a 32-bit | 502 // might need to be turned off: This is the case if running as a 32-bit |
503 // process on a 64-bit system, in which case Wow64 FS redirection redirects | 503 // process on a 64-bit system, in which case Wow64 FS redirection redirects |
504 // access to the %WINDIR%/System32/GroupPolicy directory to | 504 // access to the %WINDIR%/System32/GroupPolicy directory to |
505 // %WINDIR%/SysWOW64/GroupPolicy, but the file is actually in the | 505 // %WINDIR%/SysWOW64/GroupPolicy, but the file is actually in the |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 | 691 |
692 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { | 692 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { |
693 DCHECK(object == user_policy_changed_event_.handle() || | 693 DCHECK(object == user_policy_changed_event_.handle() || |
694 object == machine_policy_changed_event_.handle()) | 694 object == machine_policy_changed_event_.handle()) |
695 << "unexpected object signaled policy reload, obj = " | 695 << "unexpected object signaled policy reload, obj = " |
696 << std::showbase << std::hex << object; | 696 << std::showbase << std::hex << object; |
697 Reload(false); | 697 Reload(false); |
698 } | 698 } |
699 | 699 |
700 } // namespace policy | 700 } // namespace policy |
OLD | NEW |