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 | 5 |
6 #include <windows.h> | 6 #include <windows.h> |
7 #include <shlobj.h> | 7 #include <shlobj.h> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 break; | 188 break; |
189 case base::DIR_USER_QUICK_LAUNCH: | 189 case base::DIR_USER_QUICK_LAUNCH: |
190 if (!GetQuickLaunchPath(false, &cur)) | 190 if (!GetQuickLaunchPath(false, &cur)) |
191 return false; | 191 return false; |
192 break; | 192 break; |
193 case base::DIR_DEFAULT_USER_QUICK_LAUNCH: | 193 case base::DIR_DEFAULT_USER_QUICK_LAUNCH: |
194 if (!GetQuickLaunchPath(true, &cur)) | 194 if (!GetQuickLaunchPath(true, &cur)) |
195 return false; | 195 return false; |
196 break; | 196 break; |
197 case base::DIR_TASKBAR_PINS: | 197 case base::DIR_TASKBAR_PINS: |
| 198 if (win::GetVersion() < win::VERSION_WIN7) |
| 199 return false; |
| 200 |
198 if (!PathService::Get(base::DIR_USER_QUICK_LAUNCH, &cur)) | 201 if (!PathService::Get(base::DIR_USER_QUICK_LAUNCH, &cur)) |
199 return false; | 202 return false; |
200 cur = cur.AppendASCII("User Pinned"); | 203 cur = cur.AppendASCII("User Pinned"); |
201 cur = cur.AppendASCII("TaskBar"); | 204 cur = cur.AppendASCII("TaskBar"); |
202 break; | 205 break; |
203 default: | 206 default: |
204 return false; | 207 return false; |
205 } | 208 } |
206 | 209 |
207 *result = cur; | 210 *result = cur; |
208 return true; | 211 return true; |
209 } | 212 } |
210 | 213 |
211 } // namespace base | 214 } // namespace base |
OLD | NEW |