OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <userenv.h> | 10 #include <userenv.h> |
11 | 11 |
12 #include <algorithm> | 12 #include <algorithm> |
13 #include <cstring> | 13 #include <cstring> |
14 #include <functional> | 14 #include <functional> |
15 #include <iterator> | 15 #include <iterator> |
16 #include <utility> | 16 #include <utility> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "base/base_paths.h" | 19 #include "base/base_paths.h" |
20 #include "base/callback.h" | 20 #include "base/callback.h" |
21 #include "base/files/file_path.h" | 21 #include "base/files/file_path.h" |
22 #include "base/files/file_util.h" | 22 #include "base/files/file_util.h" |
23 #include "base/files/scoped_temp_dir.h" | 23 #include "base/files/scoped_temp_dir.h" |
24 #include "base/json/json_writer.h" | 24 #include "base/json/json_writer.h" |
25 #include "base/macros.h" | 25 #include "base/macros.h" |
26 #include "base/memory/ptr_util.h" | 26 #include "base/memory/ptr_util.h" |
27 #include "base/path_service.h" | 27 #include "base/path_service.h" |
28 #include "base/process/process_handle.h" | 28 #include "base/process/process_handle.h" |
| 29 #include "base/sequenced_task_runner.h" |
29 #include "base/strings/string16.h" | 30 #include "base/strings/string16.h" |
30 #include "base/strings/string_number_conversions.h" | 31 #include "base/strings/string_number_conversions.h" |
31 #include "base/strings/string_util.h" | 32 #include "base/strings/string_util.h" |
32 #include "base/strings/stringprintf.h" | 33 #include "base/strings/stringprintf.h" |
33 #include "base/strings/utf_string_conversions.h" | 34 #include "base/strings/utf_string_conversions.h" |
34 #include "base/sys_byteorder.h" | 35 #include "base/sys_byteorder.h" |
35 #include "base/values.h" | 36 #include "base/values.h" |
36 #include "base/win/registry.h" | 37 #include "base/win/registry.h" |
37 #include "base/win/win_util.h" | 38 #include "base/win/win_util.h" |
38 #include "components/policy/core/common/async_policy_provider.h" | 39 #include "components/policy/core/common/async_policy_provider.h" |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 expected.Get(ns_a).LoadFrom(&expected_a, POLICY_LEVEL_MANDATORY, | 1188 expected.Get(ns_a).LoadFrom(&expected_a, POLICY_LEVEL_MANDATORY, |
1188 POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM); | 1189 POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM); |
1189 base::DictionaryValue expected_b; | 1190 base::DictionaryValue expected_b; |
1190 expected_b.SetInteger("policy 1", 2); | 1191 expected_b.SetInteger("policy 1", 2); |
1191 expected.Get(ns_b).LoadFrom(&expected_b, POLICY_LEVEL_MANDATORY, | 1192 expected.Get(ns_b).LoadFrom(&expected_b, POLICY_LEVEL_MANDATORY, |
1192 POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM); | 1193 POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM); |
1193 EXPECT_TRUE(Matches(expected)); | 1194 EXPECT_TRUE(Matches(expected)); |
1194 } | 1195 } |
1195 | 1196 |
1196 } // namespace policy | 1197 } // namespace policy |
OLD | NEW |