| 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 "chrome/browser/policy/policy_loader_win.h" | 5 #include "chrome/browser/policy/policy_loader_win.h" |
| 6 | 6 |
| 7 #include <userenv.h> | 7 #include <userenv.h> |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "base/strings/utf_string_conversions.h" | 27 #include "base/strings/utf_string_conversions.h" |
| 28 #include "base/sys_byteorder.h" | 28 #include "base/sys_byteorder.h" |
| 29 #include "base/win/registry.h" | 29 #include "base/win/registry.h" |
| 30 #include "chrome/browser/policy/async_policy_provider.h" | 30 #include "chrome/browser/policy/async_policy_provider.h" |
| 31 #include "chrome/browser/policy/configuration_policy_provider_test.h" | 31 #include "chrome/browser/policy/configuration_policy_provider_test.h" |
| 32 #include "chrome/browser/policy/external_data_fetcher.h" | 32 #include "chrome/browser/policy/external_data_fetcher.h" |
| 33 #include "chrome/browser/policy/policy_bundle.h" | 33 #include "chrome/browser/policy/policy_bundle.h" |
| 34 #include "chrome/browser/policy/policy_map.h" | 34 #include "chrome/browser/policy/policy_map.h" |
| 35 #include "chrome/browser/policy/preg_parser_win.h" | 35 #include "chrome/browser/policy/preg_parser_win.h" |
| 36 #include "chrome/common/chrome_paths.h" | 36 #include "chrome/common/chrome_paths.h" |
| 37 #include "chrome/common/json_schema/json_schema_constants.h" | 37 #include "components/json_schema/json_schema_constants.h" |
| 38 #include "policy/policy_constants.h" | 38 #include "policy/policy_constants.h" |
| 39 #include "testing/gtest/include/gtest/gtest.h" | 39 #include "testing/gtest/include/gtest/gtest.h" |
| 40 | 40 |
| 41 namespace schema = json_schema_constants; | 41 namespace schema = json_schema_constants; |
| 42 | 42 |
| 43 using base::win::RegKey; | 43 using base::win::RegKey; |
| 44 | 44 |
| 45 namespace policy { | 45 namespace policy { |
| 46 | 46 |
| 47 namespace { | 47 namespace { |
| (...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1188 .LoadFrom(&expected_a, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE); | 1188 .LoadFrom(&expected_a, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE); |
| 1189 base::DictionaryValue expected_b; | 1189 base::DictionaryValue expected_b; |
| 1190 expected_b.SetInteger("policy 1", 2); | 1190 expected_b.SetInteger("policy 1", 2); |
| 1191 expected.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, | 1191 expected.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, |
| 1192 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")) | 1192 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")) |
| 1193 .LoadFrom(&expected_b, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE); | 1193 .LoadFrom(&expected_b, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE); |
| 1194 EXPECT_TRUE(Matches(expected)); | 1194 EXPECT_TRUE(Matches(expected)); |
| 1195 } | 1195 } |
| 1196 | 1196 |
| 1197 } // namespace policy | 1197 } // namespace policy |
| OLD | NEW |