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 (win::GetVersion() < win::VERSION_VISTA) | |
brettw
2014/03/25 19:28:18
be consistent w.r.t. base::win or just ::win. I us
scottmg
2014/03/25 19:45:58
Was copy-pasta from DIR_APP_SHORTCUTS case. :/
| |
196 return false; | |
197 | |
198 base::win::ScopedCoMem<wchar_t> path_buf; | |
199 if (FAILED(SHGetKnownFolderPath(FOLDERID_Fonts, 0, NULL, | |
200 &path_buf))) | |
201 return false; | |
202 | |
203 cur = FilePath(string16(path_buf)); | |
204 break; | |
205 } | |
194 default: | 206 default: |
195 return false; | 207 return false; |
196 } | 208 } |
197 | 209 |
198 *result = cur; | 210 *result = cur; |
199 return true; | 211 return true; |
200 } | 212 } |
201 | 213 |
202 } // namespace base | 214 } // namespace base |
OLD | NEW |