summaryrefslogtreecommitdiff
path: root/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp')
-rw-r--r--Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp b/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp
index e757cc2ea..f0aa966db 100644
--- a/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp
+++ b/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp
@@ -29,25 +29,31 @@
#include <WebCore/FileSystem.h>
#include <glib.h>
-#include <wtf/gobject/GlibUtilities.h>
+
+#if ENABLE(DEVELOPER_MODE)
+#include <wtf/glib/GLibUtilities.h>
+#endif
using namespace WebCore;
namespace WebKit {
+#if ENABLE(DEVELOPER_MODE)
static String getExecutablePath()
{
CString executablePath = getCurrentExecutablePath();
if (!executablePath.isNull())
- return directoryName(filenameToString(executablePath.data()));
+ return directoryName(stringFromFileSystemRepresentation(executablePath.data()));
return String();
}
+#endif
static String findWebKitProcess(const char* processName)
{
+#if ENABLE(DEVELOPER_MODE)
static const char* execDirectory = g_getenv("WEBKIT_EXEC_PATH");
if (execDirectory) {
- String processPath = pathByAppendingComponent(filenameToString(execDirectory), processName);
+ String processPath = pathByAppendingComponent(stringFromFileSystemRepresentation(execDirectory), processName);
if (fileExists(processPath))
return processPath;
}
@@ -58,8 +64,9 @@ static String findWebKitProcess(const char* processName)
if (fileExists(processPath))
return processPath;
}
+#endif
- return pathByAppendingComponent(filenameToString(LIBEXECDIR), processName);
+ return pathByAppendingComponent(stringFromFileSystemRepresentation(PKGLIBEXECDIR), processName);
}
String executablePathOfWebProcess()
@@ -72,11 +79,16 @@ String executablePathOfPluginProcess()
return findWebKitProcess("WebKitPluginProcess");
}
-#if ENABLE(NETWORK_PROCESS)
String executablePathOfNetworkProcess()
{
return findWebKitProcess("WebKitNetworkProcess");
}
+
+#if ENABLE(DATABASE_PROCESS)
+String executablePathOfDatabaseProcess()
+{
+ return findWebKitProcess("WebKitDatabaseProcess");
+}
#endif
} // namespace WebKit