| OLD | NEW |
| 1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2010 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 "chrome/common/chrome_paths.h" | 5 #include "chrome/common/chrome_paths.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 if (!PathService::Get(chrome::DIR_APP, &cur)) | 151 if (!PathService::Get(chrome::DIR_APP, &cur)) |
| 152 return false; | 152 return false; |
| 153 cur = cur.Append(FILE_PATH_LITERAL("resources")); | 153 cur = cur.Append(FILE_PATH_LITERAL("resources")); |
| 154 #endif | 154 #endif |
| 155 break; | 155 break; |
| 156 case chrome::DIR_SHARED_RESOURCES: | 156 case chrome::DIR_SHARED_RESOURCES: |
| 157 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) | 157 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) |
| 158 return false; | 158 return false; |
| 159 cur = cur.Append(FILE_PATH_LITERAL("shared")); | 159 cur = cur.Append(FILE_PATH_LITERAL("shared")); |
| 160 break; | 160 break; |
| 161 case chrome::DIR_PRINT_PREVIEW: |
| 162 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) |
| 163 return false; |
| 164 cur = cur.Append(FILE_PATH_LITERAL("print_preview")); |
| 165 break; |
| 161 case chrome::DIR_INSPECTOR: | 166 case chrome::DIR_INSPECTOR: |
| 162 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) | 167 if (!PathService::Get(chrome::DIR_RESOURCES, &cur)) |
| 163 return false; | 168 return false; |
| 164 cur = cur.Append(FILE_PATH_LITERAL("inspector")); | 169 cur = cur.Append(FILE_PATH_LITERAL("inspector")); |
| 165 break; | 170 break; |
| 166 case chrome::DIR_APP_DICTIONARIES: | 171 case chrome::DIR_APP_DICTIONARIES: |
| 167 #if defined(OS_LINUX) || defined(OS_MACOSX) | 172 #if defined(OS_LINUX) || defined(OS_MACOSX) |
| 168 // We can't write into the EXE dir on Linux, so keep dictionaries | 173 // We can't write into the EXE dir on Linux, so keep dictionaries |
| 169 // alongside the safe browsing database in the user data dir. | 174 // alongside the safe browsing database in the user data dir. |
| 170 // And we don't want to write into the bundle on the Mac, so push | 175 // And we don't want to write into the bundle on the Mac, so push |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 return true; | 312 return true; |
| 308 } | 313 } |
| 309 | 314 |
| 310 // This cannot be done as a static initializer sadly since Visual Studio will | 315 // This cannot be done as a static initializer sadly since Visual Studio will |
| 311 // eliminate this object file if there is no direct entry point into it. | 316 // eliminate this object file if there is no direct entry point into it. |
| 312 void RegisterPathProvider() { | 317 void RegisterPathProvider() { |
| 313 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 318 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| 314 } | 319 } |
| 315 | 320 |
| 316 } // namespace chrome | 321 } // namespace chrome |
| OLD | NEW |