OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <shellapi.h> | 6 #include <shellapi.h> |
7 #include <shlobj.h> | 7 #include <shlobj.h> |
8 | 8 |
9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
10 | 10 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 break; | 88 break; |
89 case chrome::DIR_CRASH_DUMPS: | 89 case chrome::DIR_CRASH_DUMPS: |
90 // The crash reports are always stored relative to the default user data | 90 // The crash reports are always stored relative to the default user data |
91 // directory. This avoids the problem of having to re-initialize the | 91 // directory. This avoids the problem of having to re-initialize the |
92 // exception handler after parsing command line options, which may | 92 // exception handler after parsing command line options, which may |
93 // override the location of the app's profile directory. | 93 // override the location of the app's profile directory. |
94 if (!GetDefaultUserDataDirectory(&cur)) | 94 if (!GetDefaultUserDataDirectory(&cur)) |
95 return false; | 95 return false; |
96 file_util::AppendToPath(&cur, L"Crash Reports"); | 96 file_util::AppendToPath(&cur, L"Crash Reports"); |
97 break; | 97 break; |
98 case chrome::DIR_DEFAULT_DOWNLOAD: | 98 case chrome::DIR_USER_DESKTOP: |
99 if (FAILED(SHGetFolderPath(NULL, CSIDL_DESKTOPDIRECTORY, NULL, | 99 if (FAILED(SHGetFolderPath(NULL, CSIDL_DESKTOPDIRECTORY, NULL, |
100 SHGFP_TYPE_CURRENT, system_buffer))) | 100 SHGFP_TYPE_CURRENT, system_buffer))) |
101 return false; | 101 return false; |
102 cur = system_buffer; | 102 cur = system_buffer; |
103 exists = true; | 103 exists = true; |
104 break; | 104 break; |
105 case chrome::DIR_RESOURCES: | 105 case chrome::DIR_RESOURCES: |
106 if (!PathService::Get(chrome::DIR_APP, &cur)) | 106 if (!PathService::Get(chrome::DIR_APP, &cur)) |
107 return false; | 107 return false; |
108 file_util::AppendToPath(&cur, L"resources"); | 108 file_util::AppendToPath(&cur, L"resources"); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 } | 210 } |
211 | 211 |
212 // This cannot be done as a static initializer sadly since Visual Studio will | 212 // This cannot be done as a static initializer sadly since Visual Studio will |
213 // eliminate this object file if there is no direct entry point into it. | 213 // eliminate this object file if there is no direct entry point into it. |
214 void RegisterPathProvider() { | 214 void RegisterPathProvider() { |
215 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 215 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
216 } | 216 } |
217 | 217 |
218 } // namespace chrome | 218 } // namespace chrome |
219 | 219 |
OLD | NEW |