| 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> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "base/strings/utf_string_conversions.h" | 33 #include "base/strings/utf_string_conversions.h" |
| 34 #include "base/sys_byteorder.h" | 34 #include "base/sys_byteorder.h" |
| 35 #include "base/win/registry.h" | 35 #include "base/win/registry.h" |
| 36 #include "base/win/win_util.h" | 36 #include "base/win/win_util.h" |
| 37 #include "components/policy/core/common/async_policy_provider.h" | 37 #include "components/policy/core/common/async_policy_provider.h" |
| 38 #include "components/policy/core/common/configuration_policy_provider_test.h" | 38 #include "components/policy/core/common/configuration_policy_provider_test.h" |
| 39 #include "components/policy/core/common/external_data_fetcher.h" | 39 #include "components/policy/core/common/external_data_fetcher.h" |
| 40 #include "components/policy/core/common/policy_bundle.h" | 40 #include "components/policy/core/common/policy_bundle.h" |
| 41 #include "components/policy/core/common/policy_map.h" | 41 #include "components/policy/core/common/policy_map.h" |
| 42 #include "components/policy/core/common/policy_types.h" | 42 #include "components/policy/core/common/policy_types.h" |
| 43 #include "components/policy/core/common/preg_parser_win.h" | 43 #include "components/policy/core/common/preg_parser.h" |
| 44 #include "components/policy/core/common/schema_map.h" | 44 #include "components/policy/core/common/schema_map.h" |
| 45 #include "testing/gtest/include/gtest/gtest.h" | 45 #include "testing/gtest/include/gtest/gtest.h" |
| 46 | 46 |
| 47 using base::UTF8ToUTF16; | 47 using base::UTF8ToUTF16; |
| 48 using base::UTF16ToUTF8; | 48 using base::UTF16ToUTF8; |
| 49 using base::win::RegKey; | 49 using base::win::RegKey; |
| 50 | 50 |
| 51 namespace policy { | 51 namespace policy { |
| 52 | 52 |
| 53 namespace { | 53 namespace { |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1185 expected.Get(ns_a).LoadFrom(&expected_a, POLICY_LEVEL_MANDATORY, | 1185 expected.Get(ns_a).LoadFrom(&expected_a, POLICY_LEVEL_MANDATORY, |
| 1186 POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM); | 1186 POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM); |
| 1187 base::DictionaryValue expected_b; | 1187 base::DictionaryValue expected_b; |
| 1188 expected_b.SetInteger("policy 1", 2); | 1188 expected_b.SetInteger("policy 1", 2); |
| 1189 expected.Get(ns_b).LoadFrom(&expected_b, POLICY_LEVEL_MANDATORY, | 1189 expected.Get(ns_b).LoadFrom(&expected_b, POLICY_LEVEL_MANDATORY, |
| 1190 POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM); | 1190 POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM); |
| 1191 EXPECT_TRUE(Matches(expected)); | 1191 EXPECT_TRUE(Matches(expected)); |
| 1192 } | 1192 } |
| 1193 | 1193 |
| 1194 } // namespace policy | 1194 } // namespace policy |
| OLD | NEW |