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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 const base::FilePath::CharType kPepperFlashSystemBaseDirectory[] = | 59 const base::FilePath::CharType kPepperFlashSystemBaseDirectory[] = |
60 FILE_PATH_LITERAL("Macromed\\Flash"); | 60 FILE_PATH_LITERAL("Macromed\\Flash"); |
61 #elif defined(OS_MACOSX) && !defined(OS_IOS) | 61 #elif defined(OS_MACOSX) && !defined(OS_IOS) |
62 const base::FilePath::CharType kPepperFlashSystemBaseDirectory[] = | 62 const base::FilePath::CharType kPepperFlashSystemBaseDirectory[] = |
63 FILE_PATH_LITERAL("Internet Plug-Ins/PepperFlashPlayer"); | 63 FILE_PATH_LITERAL("Internet Plug-Ins/PepperFlashPlayer"); |
64 #endif | 64 #endif |
65 | 65 |
66 const base::FilePath::CharType kInternalNaClPluginFileName[] = | 66 const base::FilePath::CharType kInternalNaClPluginFileName[] = |
67 FILE_PATH_LITERAL("internal-nacl-plugin"); | 67 FILE_PATH_LITERAL("internal-nacl-plugin"); |
68 | 68 |
69 const base::FilePath::CharType kEffectsPluginFileName[] = | |
70 #if defined(OS_WIN) | |
71 FILE_PATH_LITERAL("pepper/libppeffects.dll"); | |
72 #elif defined(OS_MACOSX) | |
73 FILE_PATH_LITERAL("pepper/libppeffects.plugin"); | |
74 #else // Linux and Chrome OS | |
75 FILE_PATH_LITERAL("pepper/libppeffects.so"); | |
76 #endif | |
77 | |
78 #if defined(OS_LINUX) | 69 #if defined(OS_LINUX) |
79 // The path to the external extension <id>.json files. | 70 // The path to the external extension <id>.json files. |
80 // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ | 71 // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ |
81 const base::FilePath::CharType kFilepathSinglePrefExtensions[] = | 72 const base::FilePath::CharType kFilepathSinglePrefExtensions[] = |
82 #if defined(GOOGLE_CHROME_BUILD) | 73 #if defined(GOOGLE_CHROME_BUILD) |
83 FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); | 74 FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); |
84 #else | 75 #else |
85 FILE_PATH_LITERAL("/usr/share/chromium/extensions"); | 76 FILE_PATH_LITERAL("/usr/share/chromium/extensions"); |
86 #endif // defined(GOOGLE_CHROME_BUILD) | 77 #endif // defined(GOOGLE_CHROME_BUILD) |
87 #endif // defined(OS_LINUX) | 78 #endif // defined(OS_LINUX) |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 case chrome::FILE_FLASH_PLUGIN: | 300 case chrome::FILE_FLASH_PLUGIN: |
310 if (!GetInternalPluginsDirectory(&cur)) | 301 if (!GetInternalPluginsDirectory(&cur)) |
311 return false; | 302 return false; |
312 cur = cur.Append(kInternalFlashPluginFileName); | 303 cur = cur.Append(kInternalFlashPluginFileName); |
313 break; | 304 break; |
314 case chrome::FILE_PEPPER_FLASH_PLUGIN: | 305 case chrome::FILE_PEPPER_FLASH_PLUGIN: |
315 if (!PathService::Get(chrome::DIR_PEPPER_FLASH_PLUGIN, &cur)) | 306 if (!PathService::Get(chrome::DIR_PEPPER_FLASH_PLUGIN, &cur)) |
316 return false; | 307 return false; |
317 cur = cur.Append(chrome::kPepperFlashPluginFilename); | 308 cur = cur.Append(chrome::kPepperFlashPluginFilename); |
318 break; | 309 break; |
319 case chrome::FILE_EFFECTS_PLUGIN: | |
320 if (!GetInternalPluginsDirectory(&cur)) | |
321 return false; | |
322 cur = cur.Append(kEffectsPluginFileName); | |
323 break; | |
324 // TODO(teravest): Remove this case once the internal NaCl plugin is gone. | 310 // TODO(teravest): Remove this case once the internal NaCl plugin is gone. |
325 // We currently need a path here to look up whether the plugin is disabled | 311 // We currently need a path here to look up whether the plugin is disabled |
326 // and what its permissions are. | 312 // and what its permissions are. |
327 case chrome::FILE_NACL_PLUGIN: | 313 case chrome::FILE_NACL_PLUGIN: |
328 if (!GetInternalPluginsDirectory(&cur)) | 314 if (!GetInternalPluginsDirectory(&cur)) |
329 return false; | 315 return false; |
330 cur = cur.Append(kInternalNaClPluginFileName); | 316 cur = cur.Append(kInternalNaClPluginFileName); |
331 break; | 317 break; |
332 // PNaCl is currenly installable via the component updater or by being | 318 // PNaCl is currenly installable via the component updater or by being |
333 // simply built-in. DIR_PNACL_BASE is used as the base directory for | 319 // simply built-in. DIR_PNACL_BASE is used as the base directory for |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 | 578 |
593 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 579 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
594 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 580 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
595 } | 581 } |
596 | 582 |
597 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 583 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
598 return g_invalid_specified_user_data_dir.Get(); | 584 return g_invalid_specified_user_data_dir.Get(); |
599 } | 585 } |
600 | 586 |
601 } // namespace chrome | 587 } // namespace chrome |
OLD | NEW |