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/file_util.h" | 7 #include "base/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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 // File name of the internal PDF plugin on different platforms. | 53 // File name of the internal PDF plugin on different platforms. |
54 const base::FilePath::CharType kInternalPDFPluginFileName[] = | 54 const base::FilePath::CharType kInternalPDFPluginFileName[] = |
55 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
56 FILE_PATH_LITERAL("pdf.dll"); | 56 FILE_PATH_LITERAL("pdf.dll"); |
57 #elif defined(OS_MACOSX) | 57 #elif defined(OS_MACOSX) |
58 FILE_PATH_LITERAL("PDF.plugin"); | 58 FILE_PATH_LITERAL("PDF.plugin"); |
59 #else // Linux and Chrome OS | 59 #else // Linux and Chrome OS |
60 FILE_PATH_LITERAL("libpdf.so"); | 60 FILE_PATH_LITERAL("libpdf.so"); |
61 #endif | 61 #endif |
62 | 62 |
63 // File name of the internal NaCl plugin on different platforms. | |
64 const base::FilePath::CharType kInternalNaClPluginFileName[] = | 63 const base::FilePath::CharType kInternalNaClPluginFileName[] = |
Mark Seaborn
2014/07/28 20:28:36
Is it difficult to remove the use of kInternalNaCl
teravest
2014/07/28 22:04:21
Yes, there's some more work involved that I'd rath
| |
65 #if defined(OS_WIN) | 64 FILE_PATH_LITERAL("internal-nacl-plugin"); |
66 FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll"); | |
67 #elif defined(OS_MACOSX) | |
68 // TODO(noelallen) Please verify this extention name is correct. | |
69 FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin"); | |
70 #else // Linux and Chrome OS | |
71 FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so"); | |
72 #endif | |
73 | 65 |
74 const base::FilePath::CharType kEffectsPluginFileName[] = | 66 const base::FilePath::CharType kEffectsPluginFileName[] = |
75 #if defined(OS_WIN) | 67 #if defined(OS_WIN) |
76 FILE_PATH_LITERAL("pepper/libppeffects.dll"); | 68 FILE_PATH_LITERAL("pepper/libppeffects.dll"); |
77 #elif defined(OS_MACOSX) | 69 #elif defined(OS_MACOSX) |
78 FILE_PATH_LITERAL("pepper/libppeffects.plugin"); | 70 FILE_PATH_LITERAL("pepper/libppeffects.plugin"); |
79 #else // Linux and Chrome OS | 71 #else // Linux and Chrome OS |
80 FILE_PATH_LITERAL("pepper/libppeffects.so"); | 72 FILE_PATH_LITERAL("pepper/libppeffects.so"); |
81 #endif | 73 #endif |
82 | 74 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
308 cur = cur.Append(kInternalPDFPluginFileName); | 300 cur = cur.Append(kInternalPDFPluginFileName); |
309 break; | 301 break; |
310 case chrome::FILE_EFFECTS_PLUGIN: | 302 case chrome::FILE_EFFECTS_PLUGIN: |
311 if (!GetInternalPluginsDirectory(&cur)) | 303 if (!GetInternalPluginsDirectory(&cur)) |
312 return false; | 304 return false; |
313 cur = cur.Append(kEffectsPluginFileName); | 305 cur = cur.Append(kEffectsPluginFileName); |
314 break; | 306 break; |
315 case chrome::FILE_NACL_PLUGIN: | 307 case chrome::FILE_NACL_PLUGIN: |
316 if (!GetInternalPluginsDirectory(&cur)) | 308 if (!GetInternalPluginsDirectory(&cur)) |
317 return false; | 309 return false; |
318 cur = cur.Append(kInternalNaClPluginFileName); | 310 cur = cur.Append(kInternalNaClPluginFileName); |
Mark Seaborn
2014/07/28 20:28:36
The use is here... If it's difficult to remove FI
teravest
2014/07/28 22:04:22
I've added a TODO here.
| |
319 break; | 311 break; |
320 // PNaCl is currenly installable via the component updater or by being | 312 // PNaCl is currenly installable via the component updater or by being |
321 // simply built-in. DIR_PNACL_BASE is used as the base directory for | 313 // simply built-in. DIR_PNACL_BASE is used as the base directory for |
322 // installation via component updater. DIR_PNACL_COMPONENT will be | 314 // installation via component updater. DIR_PNACL_COMPONENT will be |
323 // the final location of pnacl, which is a subdir of DIR_PNACL_BASE. | 315 // the final location of pnacl, which is a subdir of DIR_PNACL_BASE. |
324 case chrome::DIR_PNACL_BASE: | 316 case chrome::DIR_PNACL_BASE: |
325 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 317 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
326 return false; | 318 return false; |
327 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); | 319 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); |
328 break; | 320 break; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
604 | 596 |
605 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 597 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
606 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 598 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
607 } | 599 } |
608 | 600 |
609 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 601 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
610 return g_invalid_specified_user_data_dir.Get(); | 602 return g_invalid_specified_user_data_dir.Get(); |
611 } | 603 } |
612 | 604 |
613 } // namespace chrome | 605 } // namespace chrome |
OLD | NEW |