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/environment.h" | 9 #include "base/environment.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // Windows. | 166 // Windows. |
167 // http://stackoverflow.com/questions/76080/how-do-you-reliably-get-the-qu
ick- | 167 // http://stackoverflow.com/questions/76080/how-do-you-reliably-get-the-qu
ick- |
168 // http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept05/he
y0901.mspx | 168 // http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept05/he
y0901.mspx |
169 cur = cur.Append(FILE_PATH_LITERAL("Microsoft")) | 169 cur = cur.Append(FILE_PATH_LITERAL("Microsoft")) |
170 .Append(FILE_PATH_LITERAL("Internet Explorer")) | 170 .Append(FILE_PATH_LITERAL("Internet Explorer")) |
171 .Append(FILE_PATH_LITERAL("Quick Launch")); | 171 .Append(FILE_PATH_LITERAL("Quick Launch")); |
172 break; | 172 break; |
173 case base::DIR_TASKBAR_PINS: | 173 case base::DIR_TASKBAR_PINS: |
174 if (!PathService::Get(base::DIR_USER_QUICK_LAUNCH, &cur)) | 174 if (!PathService::Get(base::DIR_USER_QUICK_LAUNCH, &cur)) |
175 return false; | 175 return false; |
176 cur = cur.Append(FILE_PATH_LITERAL("User Pinned")); | 176 cur = cur.Append(FILE_PATH_LITERAL("User Pinned")) |
177 cur = cur.Append(FILE_PATH_LITERAL("TaskBar")); | 177 .Append(FILE_PATH_LITERAL("TaskBar")); |
| 178 break; |
| 179 case base::DIR_IMPLICIT_APP_SHORTCUTS: |
| 180 if (!PathService::Get(base::DIR_USER_QUICK_LAUNCH, &cur)) |
| 181 return false; |
| 182 cur = cur.Append(FILE_PATH_LITERAL("User Pinned")) |
| 183 .Append(FILE_PATH_LITERAL("ImplicitAppShortcuts")); |
178 break; | 184 break; |
179 case base::DIR_WINDOWS_FONTS: | 185 case base::DIR_WINDOWS_FONTS: |
180 if (FAILED(SHGetFolderPath( | 186 if (FAILED(SHGetFolderPath( |
181 NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, system_buffer))) { | 187 NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, system_buffer))) { |
182 return false; | 188 return false; |
183 } | 189 } |
184 cur = FilePath(system_buffer); | 190 cur = FilePath(system_buffer); |
185 break; | 191 break; |
186 default: | 192 default: |
187 return false; | 193 return false; |
188 } | 194 } |
189 | 195 |
190 *result = cur; | 196 *result = cur; |
191 return true; | 197 return true; |
192 } | 198 } |
193 | 199 |
194 } // namespace base | 200 } // namespace base |
OLD | NEW |