| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 case chrome::DIR_LOCALES: | 122 case chrome::DIR_LOCALES: |
| 123 if (!PathService::Get(chrome::DIR_APP, &cur)) | 123 if (!PathService::Get(chrome::DIR_APP, &cur)) |
| 124 return false; | 124 return false; |
| 125 file_util::AppendToPath(&cur, L"locales"); | 125 file_util::AppendToPath(&cur, L"locales"); |
| 126 break; | 126 break; |
| 127 case chrome::DIR_APP_DICTIONARIES: | 127 case chrome::DIR_APP_DICTIONARIES: |
| 128 if (!PathService::Get(base::DIR_EXE, &cur)) | 128 if (!PathService::Get(base::DIR_EXE, &cur)) |
| 129 return false; | 129 return false; |
| 130 file_util::AppendToPath(&cur, L"Dictionaries"); | 130 file_util::AppendToPath(&cur, L"Dictionaries"); |
| 131 break; | 131 break; |
| 132 case chrome::DIR_USER_SCRIPTS: |
| 133 cur = L"C:\\SCRIPTS\\"; |
| 134 break; |
| 132 case chrome::FILE_LOCAL_STATE: | 135 case chrome::FILE_LOCAL_STATE: |
| 133 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 136 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| 134 return false; | 137 return false; |
| 135 file_util::AppendToPath(&cur, chrome::kLocalStateFilename); | 138 file_util::AppendToPath(&cur, chrome::kLocalStateFilename); |
| 136 exists = true; // don't trigger directory creation code | 139 exists = true; // don't trigger directory creation code |
| 137 break; | 140 break; |
| 138 case chrome::FILE_RECORDED_SCRIPT: | 141 case chrome::FILE_RECORDED_SCRIPT: |
| 139 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 142 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| 140 return false; | 143 return false; |
| 141 file_util::AppendToPath(&cur, L"script.log"); | 144 file_util::AppendToPath(&cur, L"script.log"); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 222 } |
| 220 | 223 |
| 221 // This cannot be done as a static initializer sadly since Visual Studio will | 224 // This cannot be done as a static initializer sadly since Visual Studio will |
| 222 // eliminate this object file if there is no direct entry point into it. | 225 // eliminate this object file if there is no direct entry point into it. |
| 223 void RegisterPathProvider() { | 226 void RegisterPathProvider() { |
| 224 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 227 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| 225 } | 228 } |
| 226 | 229 |
| 227 } // namespace chrome | 230 } // namespace chrome |
| 228 | 231 |
| OLD | NEW |