| 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 #include "chrome/common/chrome_paths.h" | 5 #include "chrome/common/chrome_paths.h" |
| 6 | 6 |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 FILE_PATH_LITERAL("gcswf32.dll"); | 39 FILE_PATH_LITERAL("gcswf32.dll"); |
| 40 #else // OS_LINUX, etc. | 40 #else // OS_LINUX, etc. |
| 41 FILE_PATH_LITERAL("libgcflashplayer.so"); | 41 FILE_PATH_LITERAL("libgcflashplayer.so"); |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 // The Pepper Flash plugins are in a directory with this name. | 44 // The Pepper Flash plugins are in a directory with this name. |
| 45 const base::FilePath::CharType kPepperFlashBaseDirectory[] = | 45 const base::FilePath::CharType kPepperFlashBaseDirectory[] = |
| 46 FILE_PATH_LITERAL("PepperFlash"); | 46 FILE_PATH_LITERAL("PepperFlash"); |
| 47 | 47 |
| 48 #if defined(OS_WIN) | 48 #if defined(OS_WIN) |
| 49 const base::FilePath::CharType kPepperFlashDebuggerBaseDirectory[] = | 49 const base::FilePath::CharType kPepperFlashSystemBaseDirectory[] = |
| 50 FILE_PATH_LITERAL("Macromed\\Flash"); | 50 FILE_PATH_LITERAL("Macromed\\Flash"); |
| 51 #elif defined(OS_MACOSX) |
| 52 const base::FilePath::CharType kPepperFlashSystemBaseDirectory[] = |
| 53 FILE_PATH_LITERAL("Internet Plug-Ins/PepperFlashPlayer"); |
| 51 #endif | 54 #endif |
| 52 | 55 |
| 53 const base::FilePath::CharType kInternalNaClPluginFileName[] = | 56 const base::FilePath::CharType kInternalNaClPluginFileName[] = |
| 54 FILE_PATH_LITERAL("internal-nacl-plugin"); | 57 FILE_PATH_LITERAL("internal-nacl-plugin"); |
| 55 | 58 |
| 56 const base::FilePath::CharType kEffectsPluginFileName[] = | 59 const base::FilePath::CharType kEffectsPluginFileName[] = |
| 57 #if defined(OS_WIN) | 60 #if defined(OS_WIN) |
| 58 FILE_PATH_LITERAL("pepper/libppeffects.dll"); | 61 FILE_PATH_LITERAL("pepper/libppeffects.dll"); |
| 59 #elif defined(OS_MACOSX) | 62 #elif defined(OS_MACOSX) |
| 60 FILE_PATH_LITERAL("pepper/libppeffects.plugin"); | 63 FILE_PATH_LITERAL("pepper/libppeffects.plugin"); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 case chrome::DIR_PEPPER_FLASH_PLUGIN: | 247 case chrome::DIR_PEPPER_FLASH_PLUGIN: |
| 245 if (!GetInternalPluginsDirectory(&cur)) | 248 if (!GetInternalPluginsDirectory(&cur)) |
| 246 return false; | 249 return false; |
| 247 cur = cur.Append(kPepperFlashBaseDirectory); | 250 cur = cur.Append(kPepperFlashBaseDirectory); |
| 248 break; | 251 break; |
| 249 case chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN: | 252 case chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN: |
| 250 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 253 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| 251 return false; | 254 return false; |
| 252 cur = cur.Append(kPepperFlashBaseDirectory); | 255 cur = cur.Append(kPepperFlashBaseDirectory); |
| 253 break; | 256 break; |
| 254 case chrome::DIR_PEPPER_FLASH_DEBUGGER_PLUGIN: | 257 case chrome::DIR_PEPPER_FLASH_SYSTEM_PLUGIN: |
| 255 #if defined(OS_WIN) | 258 #if defined(OS_WIN) |
| 256 if (!PathService::Get(base::DIR_SYSTEM, &cur)) | 259 if (!PathService::Get(base::DIR_SYSTEM, &cur)) |
| 257 return false; | 260 return false; |
| 258 cur = cur.Append(kPepperFlashDebuggerBaseDirectory); | 261 cur = cur.Append(kPepperFlashSystemBaseDirectory); |
| 259 #elif defined(OS_MACOSX) | 262 #elif defined(OS_MACOSX) |
| 260 // TODO(luken): finalize Mac OS directory paths, current consensus is | 263 if (!GetLocalLibraryDirectory(&cur)) |
| 261 // around /Library/Internet Plug-Ins/PepperFlashPlayer/ | 264 return false; |
| 262 return false; | 265 cur = cur.Append(kPepperFlashSystemBaseDirectory); |
| 263 #else | 266 #else |
| 267 // TODO(wfh): If Adobe release PPAPI binaries for Linux, add support here. |
| 264 return false; | 268 return false; |
| 265 #endif | 269 #endif |
| 266 break; | 270 break; |
| 267 case chrome::FILE_LOCAL_STATE: | 271 case chrome::FILE_LOCAL_STATE: |
| 268 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 272 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| 269 return false; | 273 return false; |
| 270 cur = cur.Append(chrome::kLocalStateFilename); | 274 cur = cur.Append(chrome::kLocalStateFilename); |
| 271 break; | 275 break; |
| 272 case chrome::FILE_RECORDED_SCRIPT: | 276 case chrome::FILE_RECORDED_SCRIPT: |
| 273 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 277 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 | 576 |
| 573 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 577 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
| 574 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 578 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
| 575 } | 579 } |
| 576 | 580 |
| 577 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 581 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
| 578 return g_invalid_specified_user_data_dir.Get(); | 582 return g_invalid_specified_user_data_dir.Get(); |
| 579 } | 583 } |
| 580 | 584 |
| 581 } // namespace chrome | 585 } // namespace chrome |
| OLD | NEW |