| 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 <windows.h> | 7 #include <windows.h> |
| 8 #include <userenv.h> | 8 #include <userenv.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "base/strings/string16.h" | 24 #include "base/strings/string16.h" |
| 25 #include "base/strings/string_number_conversions.h" | 25 #include "base/strings/string_number_conversions.h" |
| 26 #include "base/strings/string_util.h" | 26 #include "base/strings/string_util.h" |
| 27 #include "base/strings/stringprintf.h" | 27 #include "base/strings/stringprintf.h" |
| 28 #include "base/strings/utf_string_conversions.h" | 28 #include "base/strings/utf_string_conversions.h" |
| 29 #include "base/sys_byteorder.h" | 29 #include "base/sys_byteorder.h" |
| 30 #include "base/win/registry.h" | 30 #include "base/win/registry.h" |
| 31 #include "chrome/browser/policy/async_policy_provider.h" | 31 #include "chrome/browser/policy/async_policy_provider.h" |
| 32 #include "chrome/browser/policy/configuration_policy_provider_test.h" | 32 #include "chrome/browser/policy/configuration_policy_provider_test.h" |
| 33 #include "chrome/browser/policy/preg_parser_win.h" | 33 #include "chrome/browser/policy/preg_parser_win.h" |
| 34 #include "chrome/browser/policy/schema_map.h" | |
| 35 #include "components/json_schema/json_schema_constants.h" | 34 #include "components/json_schema/json_schema_constants.h" |
| 36 #include "components/policy/core/common/external_data_fetcher.h" | 35 #include "components/policy/core/common/external_data_fetcher.h" |
| 37 #include "components/policy/core/common/policy_bundle.h" | 36 #include "components/policy/core/common/policy_bundle.h" |
| 38 #include "components/policy/core/common/policy_map.h" | 37 #include "components/policy/core/common/policy_map.h" |
| 38 #include "components/policy/core/common/schema_map.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 { |
| 48 | 48 |
| (...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1209 .LoadFrom(&expected_a, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE); | 1209 .LoadFrom(&expected_a, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE); |
| 1210 base::DictionaryValue expected_b; | 1210 base::DictionaryValue expected_b; |
| 1211 expected_b.SetInteger("policy 1", 2); | 1211 expected_b.SetInteger("policy 1", 2); |
| 1212 expected.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, | 1212 expected.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, |
| 1213 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")) | 1213 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")) |
| 1214 .LoadFrom(&expected_b, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE); | 1214 .LoadFrom(&expected_b, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE); |
| 1215 EXPECT_TRUE(Matches(expected)); | 1215 EXPECT_TRUE(Matches(expected)); |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 } // namespace policy | 1218 } // namespace policy |
| OLD | NEW |