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 |
11 #include <shlwapi.h> // For PathIsUNC() | 11 #include <shlwapi.h> // For PathIsUNC() |
| 12 #include <stddef.h> |
12 #include <userenv.h> // For GPO functions | 13 #include <userenv.h> // For GPO functions |
13 | 14 |
14 #include <string> | 15 #include <string> |
15 #include <vector> | 16 #include <vector> |
16 | 17 |
17 // shlwapi.dll is required for PathIsUNC(). | 18 // shlwapi.dll is required for PathIsUNC(). |
18 #pragma comment(lib, "shlwapi.lib") | 19 #pragma comment(lib, "shlwapi.lib") |
19 // userenv.dll is required for various GPO functions. | 20 // userenv.dll is required for various GPO functions. |
20 #pragma comment(lib, "userenv.lib") | 21 #pragma comment(lib, "userenv.lib") |
21 // ntdsapi.dll is required for Ds[Un]Bind calls. | 22 // ntdsapi.dll is required for Ds[Un]Bind calls. |
22 #pragma comment(lib, "ntdsapi.lib") | 23 #pragma comment(lib, "ntdsapi.lib") |
23 | 24 |
24 #include "base/basictypes.h" | |
25 #include "base/bind.h" | 25 #include "base/bind.h" |
26 #include "base/files/file_util.h" | 26 #include "base/files/file_util.h" |
27 #include "base/json/json_reader.h" | 27 #include "base/json/json_reader.h" |
28 #include "base/json/json_writer.h" | 28 #include "base/json/json_writer.h" |
29 #include "base/lazy_instance.h" | 29 #include "base/lazy_instance.h" |
30 #include "base/logging.h" | 30 #include "base/logging.h" |
| 31 #include "base/macros.h" |
31 #include "base/memory/scoped_ptr.h" | 32 #include "base/memory/scoped_ptr.h" |
32 #include "base/metrics/histogram.h" | 33 #include "base/metrics/histogram.h" |
33 #include "base/metrics/sparse_histogram.h" | 34 #include "base/metrics/sparse_histogram.h" |
34 #include "base/scoped_native_library.h" | 35 #include "base/scoped_native_library.h" |
35 #include "base/sequenced_task_runner.h" | 36 #include "base/sequenced_task_runner.h" |
36 #include "base/stl_util.h" | 37 #include "base/stl_util.h" |
37 #include "base/strings/string16.h" | 38 #include "base/strings/string16.h" |
38 #include "base/strings/string_util.h" | 39 #include "base/strings/string_util.h" |
39 #include "base/values.h" | 40 #include "base/values.h" |
40 #include "base/win/win_util.h" | 41 #include "base/win/win_util.h" |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 | 691 |
691 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { | 692 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { |
692 DCHECK(object == user_policy_changed_event_.handle() || | 693 DCHECK(object == user_policy_changed_event_.handle() || |
693 object == machine_policy_changed_event_.handle()) | 694 object == machine_policy_changed_event_.handle()) |
694 << "unexpected object signaled policy reload, obj = " | 695 << "unexpected object signaled policy reload, obj = " |
695 << std::showbase << std::hex << object; | 696 << std::showbase << std::hex << object; |
696 Reload(false); | 697 Reload(false); |
697 } | 698 } |
698 | 699 |
699 } // namespace policy | 700 } // namespace policy |
OLD | NEW |