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 <userenv.h> | 8 #include <userenv.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "components/policy/core/common/async_policy_provider.h" | 31 #include "components/policy/core/common/async_policy_provider.h" |
32 #include "components/policy/core/common/configuration_policy_provider_test.h" | 32 #include "components/policy/core/common/configuration_policy_provider_test.h" |
33 #include "components/policy/core/common/external_data_fetcher.h" | 33 #include "components/policy/core/common/external_data_fetcher.h" |
34 #include "components/policy/core/common/policy_bundle.h" | 34 #include "components/policy/core/common/policy_bundle.h" |
35 #include "components/policy/core/common/policy_map.h" | 35 #include "components/policy/core/common/policy_map.h" |
36 #include "components/policy/core/common/preg_parser_win.h" | 36 #include "components/policy/core/common/preg_parser_win.h" |
37 #include "components/policy/core/common/schema_map.h" | 37 #include "components/policy/core/common/schema_map.h" |
38 #include "testing/gtest/include/gtest/gtest.h" | 38 #include "testing/gtest/include/gtest/gtest.h" |
39 | 39 |
40 using base::UTF8ToUTF16; | 40 using base::UTF8ToUTF16; |
| 41 using base::UTF16ToUTF8; |
41 using base::win::RegKey; | 42 using base::win::RegKey; |
42 | 43 |
43 namespace policy { | 44 namespace policy { |
44 | 45 |
45 namespace { | 46 namespace { |
46 | 47 |
47 // Constants for registry key names. | 48 // Constants for registry key names. |
48 const wchar_t kPathSep[] = L"\\"; | 49 const wchar_t kPathSep[] = L"\\"; |
49 const wchar_t kThirdParty[] = L"3rdparty"; | 50 const wchar_t kThirdParty[] = L"3rdparty"; |
50 const wchar_t kMandatory[] = L"policy"; | 51 const wchar_t kMandatory[] = L"policy"; |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 PolicyMap& expected_policy = expected.Get(ns); | 1180 PolicyMap& expected_policy = expected.Get(ns); |
1180 expected_policy.Set("alternative_browser_path", | 1181 expected_policy.Set("alternative_browser_path", |
1181 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, | 1182 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
1182 new base::StringValue("c:\\legacy\\browser.exe"), NULL); | 1183 new base::StringValue("c:\\legacy\\browser.exe"), NULL); |
1183 expected_policy.Set("url_list", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, | 1184 expected_policy.Set("url_list", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
1184 list.DeepCopy(), NULL); | 1185 list.DeepCopy(), NULL); |
1185 EXPECT_TRUE(Matches(expected)); | 1186 EXPECT_TRUE(Matches(expected)); |
1186 } | 1187 } |
1187 | 1188 |
1188 } // namespace policy | 1189 } // namespace policy |
OLD | NEW |