| 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> |
| 11 #include <cstring> | 11 #include <cstring> |
| 12 #include <functional> | 12 #include <functional> |
| 13 #include <iterator> | 13 #include <iterator> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/base_paths.h" | 16 #include "base/base_paths.h" |
| 17 #include "base/callback.h" | 17 #include "base/callback.h" |
| 18 #include "base/file_util.h" | |
| 19 #include "base/files/file_path.h" | 18 #include "base/files/file_path.h" |
| 19 #include "base/files/file_util.h" |
| 20 #include "base/files/scoped_temp_dir.h" | 20 #include "base/files/scoped_temp_dir.h" |
| 21 #include "base/json/json_writer.h" | 21 #include "base/json/json_writer.h" |
| 22 #include "base/path_service.h" | 22 #include "base/path_service.h" |
| 23 #include "base/process/process.h" | 23 #include "base/process/process.h" |
| 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" |
| (...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1209 PolicyMap& expected_policy = expected.Get(ns); | 1209 PolicyMap& expected_policy = expected.Get(ns); |
| 1210 expected_policy.Set("alternative_browser_path", | 1210 expected_policy.Set("alternative_browser_path", |
| 1211 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, | 1211 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
| 1212 new base::StringValue("c:\\legacy\\browser.exe"), NULL); | 1212 new base::StringValue("c:\\legacy\\browser.exe"), NULL); |
| 1213 expected_policy.Set("url_list", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, | 1213 expected_policy.Set("url_list", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
| 1214 list.DeepCopy(), NULL); | 1214 list.DeepCopy(), NULL); |
| 1215 EXPECT_TRUE(Matches(expected)); | 1215 EXPECT_TRUE(Matches(expected)); |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 } // namespace policy | 1218 } // namespace policy |
| OLD | NEW |