| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <shlobj.h> | 5 #include <shlobj.h> |
| 6 #include <stddef.h> | 6 #include <stddef.h> |
| 7 #include <wtsapi32.h> | 7 #include <wtsapi32.h> |
| 8 #pragma comment(lib, "wtsapi32.lib") | |
| 9 | 8 |
| 10 #include "chrome/browser/policy/policy_path_parser.h" | 9 #include "chrome/browser/policy/policy_path_parser.h" |
| 11 | 10 |
| 12 #include "base/macros.h" | 11 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 15 #include "base/win/registry.h" | 14 #include "base/win/registry.h" |
| 16 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 17 #include "policy/policy_constants.h" | 16 #include "policy/policy_constants.h" |
| 18 | 17 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 void CheckUserDataDirPolicy(base::FilePath* user_data_dir) { | 146 void CheckUserDataDirPolicy(base::FilePath* user_data_dir) { |
| 148 DCHECK(user_data_dir); | 147 DCHECK(user_data_dir); |
| 149 // Policy from the HKLM hive has precedence over HKCU. | 148 // Policy from the HKLM hive has precedence over HKCU. |
| 150 if (!LoadUserDataDirPolicyFromRegistry(HKEY_LOCAL_MACHINE, user_data_dir)) | 149 if (!LoadUserDataDirPolicyFromRegistry(HKEY_LOCAL_MACHINE, user_data_dir)) |
| 151 LoadUserDataDirPolicyFromRegistry(HKEY_CURRENT_USER, user_data_dir); | 150 LoadUserDataDirPolicyFromRegistry(HKEY_CURRENT_USER, user_data_dir); |
| 152 } | 151 } |
| 153 | 152 |
| 154 } // namespace path_parser | 153 } // namespace path_parser |
| 155 | 154 |
| 156 } // namespace policy | 155 } // namespace policy |
| OLD | NEW |