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 "chrome/browser/policy/policy_path_parser.h" | 5 #include "chrome/browser/policy/policy_path_parser.h" |
6 | 6 |
7 #include "base/basictypes.h" | |
8 #include "base/files/file_path.h" | |
9 #include "base/logging.h" | |
10 #import "base/mac/scoped_nsautorelease_pool.h" | |
11 #include "base/strings/sys_string_conversions.h" | |
12 #include "policy/policy_constants.h" | |
13 | |
14 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 #include <stddef.h> |
15 #import <SystemConfiguration/SCDynamicStore.h> | 9 #import <SystemConfiguration/SCDynamicStore.h> |
16 #import <SystemConfiguration/SCDynamicStoreCopySpecific.h> | 10 #import <SystemConfiguration/SCDynamicStoreCopySpecific.h> |
17 #import <SystemConfiguration/SystemConfiguration.h> | 11 #import <SystemConfiguration/SystemConfiguration.h> |
18 | 12 |
19 #include <string> | 13 #include <string> |
20 | 14 |
| 15 #include "base/files/file_path.h" |
| 16 #include "base/logging.h" |
| 17 #import "base/mac/scoped_nsautorelease_pool.h" |
| 18 #include "base/macros.h" |
| 19 #include "base/strings/sys_string_conversions.h" |
| 20 #include "policy/policy_constants.h" |
| 21 |
21 namespace policy { | 22 namespace policy { |
22 | 23 |
23 namespace path_parser { | 24 namespace path_parser { |
24 | 25 |
25 const char* kUserNamePolicyVarName = "${user_name}"; | 26 const char* kUserNamePolicyVarName = "${user_name}"; |
26 const char* kMachineNamePolicyVarName = "${machine_name}"; | 27 const char* kMachineNamePolicyVarName = "${machine_name}"; |
27 const char* kMacUsersDirectory = "${users}"; | 28 const char* kMacUsersDirectory = "${users}"; |
28 const char* kMacDocumentsFolderVarName = "${documents}"; | 29 const char* kMacDocumentsFolderVarName = "${documents}"; |
29 | 30 |
30 struct MacFolderNamesToSPDMaping { | 31 struct MacFolderNamesToSPDMaping { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 std::string string_value = base::SysNSStringToUTF8(value); | 110 std::string string_value = base::SysNSStringToUTF8(value); |
110 // Now replace any vars the user might have used. | 111 // Now replace any vars the user might have used. |
111 string_value = policy::path_parser::ExpandPathVariables(string_value); | 112 string_value = policy::path_parser::ExpandPathVariables(string_value); |
112 *user_data_dir = base::FilePath(string_value); | 113 *user_data_dir = base::FilePath(string_value); |
113 } | 114 } |
114 } | 115 } |
115 | 116 |
116 } // namespace path_parser | 117 } // namespace path_parser |
117 | 118 |
118 } // namespace policy | 119 } // namespace policy |
OLD | NEW |