| 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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 !machine_policy_watcher_.StartWatching( | 676 !machine_policy_watcher_.StartWatching( |
| 677 machine_policy_changed_event_.handle(), this)) { | 677 machine_policy_changed_event_.handle(), this)) { |
| 678 DLOG(WARNING) << "Failed to start watch for machine policy change event"; | 678 DLOG(WARNING) << "Failed to start watch for machine policy change event"; |
| 679 machine_policy_watcher_failed_ = true; | 679 machine_policy_watcher_failed_ = true; |
| 680 } | 680 } |
| 681 } | 681 } |
| 682 | 682 |
| 683 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { | 683 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { |
| 684 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. | 684 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. |
| 685 tracked_objects::ScopedTracker tracking_profile( | 685 tracked_objects::ScopedTracker tracking_profile( |
| 686 FROM_HERE_WITH_EXPLICIT_FUNCTION("PolicyLoaderWin_OnObjectSignaled")); | 686 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 687 "418183 PolicyLoaderWin::OnObjectSignaled")); |
| 687 | 688 |
| 688 DCHECK(object == user_policy_changed_event_.handle() || | 689 DCHECK(object == user_policy_changed_event_.handle() || |
| 689 object == machine_policy_changed_event_.handle()) | 690 object == machine_policy_changed_event_.handle()) |
| 690 << "unexpected object signaled policy reload, obj = " | 691 << "unexpected object signaled policy reload, obj = " |
| 691 << std::showbase << std::hex << object; | 692 << std::showbase << std::hex << object; |
| 692 Reload(false); | 693 Reload(false); |
| 693 } | 694 } |
| 694 | 695 |
| 695 } // namespace policy | 696 } // namespace policy |
| OLD | NEW |