| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 case chrome::FILE_PDF_PLUGIN: | 241 case chrome::FILE_PDF_PLUGIN: |
| 242 if (!GetInternalPluginsDirectory(&cur)) | 242 if (!GetInternalPluginsDirectory(&cur)) |
| 243 return false; | 243 return false; |
| 244 #if defined(OS_WIN) | 244 #if defined(OS_WIN) |
| 245 cur = cur.Append(FILE_PATH_LITERAL("pdf.dll")); | 245 cur = cur.Append(FILE_PATH_LITERAL("pdf.dll")); |
| 246 #elif defined(OS_MACOSX) | 246 #elif defined(OS_MACOSX) |
| 247 cur = cur.Append(FILE_PATH_LITERAL("PDF.plugin")); | 247 cur = cur.Append(FILE_PATH_LITERAL("PDF.plugin")); |
| 248 #else // Linux and Chrome OS | 248 #else // Linux and Chrome OS |
| 249 cur = cur.Append(FILE_PATH_LITERAL("libpdf.so")); | 249 cur = cur.Append(FILE_PATH_LITERAL("libpdf.so")); |
| 250 #endif | 250 #endif |
| 251 if (!file_util::PathExists(cur)) | |
| 252 return false; | |
| 253 break; | 251 break; |
| 254 case chrome::FILE_RESOURCES_PACK: | 252 case chrome::FILE_RESOURCES_PACK: |
| 255 if (!PathService::Get(base::DIR_EXE, &cur)) | 253 if (!PathService::Get(base::DIR_EXE, &cur)) |
| 256 return false; | 254 return false; |
| 257 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); | 255 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); |
| 258 break; | 256 break; |
| 259 #if defined(OS_CHROMEOS) | 257 #if defined(OS_CHROMEOS) |
| 260 case chrome::FILE_CHROMEOS_API: | 258 case chrome::FILE_CHROMEOS_API: |
| 261 if (!PathService::Get(base::DIR_MODULE, &cur)) | 259 if (!PathService::Get(base::DIR_MODULE, &cur)) |
| 262 return false; | 260 return false; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 return true; | 295 return true; |
| 298 } | 296 } |
| 299 | 297 |
| 300 // This cannot be done as a static initializer sadly since Visual Studio will | 298 // This cannot be done as a static initializer sadly since Visual Studio will |
| 301 // eliminate this object file if there is no direct entry point into it. | 299 // eliminate this object file if there is no direct entry point into it. |
| 302 void RegisterPathProvider() { | 300 void RegisterPathProvider() { |
| 303 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 301 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| 304 } | 302 } |
| 305 | 303 |
| 306 } // namespace chrome | 304 } // namespace chrome |
| OLD | NEW |