Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2032)

Unified Diff: chrome/common/chrome_paths.cc

Issue 6528028: Cleanup: Make chrome paths code more consistent and use more constants when p... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/chrome_paths_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_paths.cc
===================================================================
--- chrome/common/chrome_paths.cc (revision 74997)
+++ chrome/common/chrome_paths.cc (working copy)
@@ -30,6 +30,27 @@
FILE_PATH_LITERAL("libgcflashplayer.so");
#endif
+// File name of the internal PDF plugin on different platforms.
+const FilePath::CharType kInternalPDFPluginFileName[] =
+#if defined(OS_WIN)
+ FILE_PATH_LITERAL("pdf.dll");
+#elif defined(OS_MACOSX)
+ FILE_PATH_LITERAL("PDF.plugin");
+#else // Linux and Chrome OS
+ FILE_PATH_LITERAL("libpdf.so");
+#endif
+
+// File name of the internal NaCl plugin on different platforms.
+const FilePath::CharType kInternalNaClPluginFileName[] =
+#if defined(OS_WIN)
+ FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll");
+#elif defined(OS_MACOSX)
+ // TODO(noelallen) Please verify this extention name is correct.
+ FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin");
+#else // Linux and Chrome OS
+ FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so");
+#endif
+
} // namespace
namespace chrome {
@@ -230,25 +251,12 @@
case chrome::FILE_PDF_PLUGIN:
if (!GetInternalPluginsDirectory(&cur))
return false;
-#if defined(OS_WIN)
- cur = cur.Append(FILE_PATH_LITERAL("pdf.dll"));
-#elif defined(OS_MACOSX)
- cur = cur.Append(FILE_PATH_LITERAL("PDF.plugin"));
-#else // Linux and Chrome OS
- cur = cur.Append(FILE_PATH_LITERAL("libpdf.so"));
-#endif
+ cur = cur.Append(kInternalPDFPluginFileName);
break;
case chrome::FILE_NACL_PLUGIN:
if (!GetInternalPluginsDirectory(&cur))
return false;
-#if defined(OS_WIN)
- cur = cur.Append(FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll"));
-#elif defined(OS_MACOSX)
- // TODO(noelallen) Please verify this extention name is correct.
- cur = cur.Append(FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin"));
-#else // Linux and Chrome OS
- cur = cur.Append(FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so"));
-#endif
+ cur = cur.Append(kInternalNaClPluginFileName);
break;
case chrome::FILE_RESOURCES_PACK:
#if defined(OS_MACOSX)
« no previous file with comments | « no previous file | chrome/common/chrome_paths_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698