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 <windows.h> | 5 #include <windows.h> |
6 #include <shlobj.h> | 6 #include <shlobj.h> |
7 | 7 |
8 #include "base/base_paths.h" | 8 #include "base/base_paths.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 case base::DIR_DEFAULT_USER_QUICK_LAUNCH: | 184 case base::DIR_DEFAULT_USER_QUICK_LAUNCH: |
185 if (!GetQuickLaunchPath(true, &cur)) | 185 if (!GetQuickLaunchPath(true, &cur)) |
186 return false; | 186 return false; |
187 break; | 187 break; |
188 case base::DIR_TASKBAR_PINS: | 188 case base::DIR_TASKBAR_PINS: |
189 if (!PathService::Get(base::DIR_USER_QUICK_LAUNCH, &cur)) | 189 if (!PathService::Get(base::DIR_USER_QUICK_LAUNCH, &cur)) |
190 return false; | 190 return false; |
191 cur = cur.AppendASCII("User Pinned"); | 191 cur = cur.AppendASCII("User Pinned"); |
192 cur = cur.AppendASCII("TaskBar"); | 192 cur = cur.AppendASCII("TaskBar"); |
193 break; | 193 break; |
| 194 case base::DIR_WINDOWS_FONTS: |
| 195 if (FAILED(SHGetFolderPath( |
| 196 NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, system_buffer))) { |
| 197 return false; |
| 198 } |
| 199 cur = FilePath(system_buffer); |
| 200 break; |
194 default: | 201 default: |
195 return false; | 202 return false; |
196 } | 203 } |
197 | 204 |
198 *result = cur; | 205 *result = cur; |
199 return true; | 206 return true; |
200 } | 207 } |
201 | 208 |
202 } // namespace base | 209 } // namespace base |
OLD | NEW |