| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 const base::FilePath::CharType kEffectsPluginFileName[] = | 69 const base::FilePath::CharType kEffectsPluginFileName[] = |
| 70 #if defined(OS_WIN) | 70 #if defined(OS_WIN) |
| 71 FILE_PATH_LITERAL("pepper/libppeffects.dll"); | 71 FILE_PATH_LITERAL("pepper/libppeffects.dll"); |
| 72 #elif defined(OS_MACOSX) | 72 #elif defined(OS_MACOSX) |
| 73 FILE_PATH_LITERAL("pepper/libppeffects.plugin"); | 73 FILE_PATH_LITERAL("pepper/libppeffects.plugin"); |
| 74 #else // Linux and Chrome OS | 74 #else // Linux and Chrome OS |
| 75 FILE_PATH_LITERAL("pepper/libppeffects.so"); | 75 FILE_PATH_LITERAL("pepper/libppeffects.so"); |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 #if defined(OS_POSIX) && !defined(OS_MACOSX) | |
| 79 | |
| 80 const base::FilePath::CharType kO1DPluginFileName[] = | |
| 81 FILE_PATH_LITERAL("pepper/libppo1d.so"); | |
| 82 | |
| 83 const base::FilePath::CharType kGTalkPluginFileName[] = | |
| 84 FILE_PATH_LITERAL("pepper/libppgoogletalk.so"); | |
| 85 | |
| 86 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | |
| 87 | |
| 88 #if defined(OS_LINUX) | 78 #if defined(OS_LINUX) |
| 89 // The path to the external extension <id>.json files. | 79 // The path to the external extension <id>.json files. |
| 90 // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ | 80 // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ |
| 91 const base::FilePath::CharType kFilepathSinglePrefExtensions[] = | 81 const base::FilePath::CharType kFilepathSinglePrefExtensions[] = |
| 92 #if defined(GOOGLE_CHROME_BUILD) | 82 #if defined(GOOGLE_CHROME_BUILD) |
| 93 FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); | 83 FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); |
| 94 #else | 84 #else |
| 95 FILE_PATH_LITERAL("/usr/share/chromium/extensions"); | 85 FILE_PATH_LITERAL("/usr/share/chromium/extensions"); |
| 96 #endif // defined(GOOGLE_CHROME_BUILD) | 86 #endif // defined(GOOGLE_CHROME_BUILD) |
| 97 #endif // defined(OS_LINUX) | 87 #endif // defined(OS_LINUX) |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 cur = cur.DirName(); | 358 cur = cur.DirName(); |
| 369 cur = cur.DirName(); | 359 cur = cur.DirName(); |
| 370 cur = cur.DirName(); | 360 cur = cur.DirName(); |
| 371 } | 361 } |
| 372 #else | 362 #else |
| 373 if (!GetInternalPluginsDirectory(&cur)) | 363 if (!GetInternalPluginsDirectory(&cur)) |
| 374 return false; | 364 return false; |
| 375 #endif | 365 #endif |
| 376 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); | 366 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); |
| 377 break; | 367 break; |
| 378 #if defined(OS_POSIX) && !defined(OS_MACOSX) | |
| 379 case chrome::FILE_O1D_PLUGIN: | |
| 380 if (!PathService::Get(base::DIR_MODULE, &cur)) | |
| 381 return false; | |
| 382 cur = cur.Append(kO1DPluginFileName); | |
| 383 break; | |
| 384 case chrome::FILE_GTALK_PLUGIN: | |
| 385 if (!PathService::Get(base::DIR_MODULE, &cur)) | |
| 386 return false; | |
| 387 cur = cur.Append(kGTalkPluginFileName); | |
| 388 break; | |
| 389 #endif | |
| 390 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) | 368 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) |
| 391 #if defined(WIDEVINE_CDM_IS_COMPONENT) | 369 #if defined(WIDEVINE_CDM_IS_COMPONENT) |
| 392 case chrome::DIR_COMPONENT_WIDEVINE_CDM: | 370 case chrome::DIR_COMPONENT_WIDEVINE_CDM: |
| 393 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 371 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
| 394 return false; | 372 return false; |
| 395 cur = cur.Append(kWidevineCdmBaseDirectory); | 373 cur = cur.Append(kWidevineCdmBaseDirectory); |
| 396 break; | 374 break; |
| 397 #endif // defined(WIDEVINE_CDM_IS_COMPONENT) | 375 #endif // defined(WIDEVINE_CDM_IS_COMPONENT) |
| 398 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. | 376 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings. |
| 399 // In the component case, this is the source adapter. Otherwise, it is the | 377 // In the component case, this is the source adapter. Otherwise, it is the |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 | 592 |
| 615 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 593 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
| 616 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 594 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
| 617 } | 595 } |
| 618 | 596 |
| 619 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 597 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
| 620 return g_invalid_specified_user_data_dir.Get(); | 598 return g_invalid_specified_user_data_dir.Get(); |
| 621 } | 599 } |
| 622 | 600 |
| 623 } // namespace chrome | 601 } // namespace chrome |
| OLD | NEW |