Index: remoting/host/security_key/remote_security_key_ipc_constants.cc |
diff --git a/remoting/host/security_key/remote_security_key_ipc_constants.cc b/remoting/host/security_key/remote_security_key_ipc_constants.cc |
index 227b284f09c78df3af11180ea0a0450f32ac8b2c..b3b5234e2d58fa9dd3bb2b5aa61f1fc66900d21d 100644 |
--- a/remoting/host/security_key/remote_security_key_ipc_constants.cc |
+++ b/remoting/host/security_key/remote_security_key_ipc_constants.cc |
@@ -4,6 +4,7 @@ |
#include "remoting/host/security_key/remote_security_key_ipc_constants.h" |
+#include "base/environment.h" |
#include "base/lazy_instance.h" |
namespace { |
@@ -34,4 +35,15 @@ void SetRemoteSecurityKeyIpcChannelNameForTest( |
g_remote_security_key_ipc_channel_name.Get() = channel_name; |
} |
+std::string GetChannelNamePathPrefixForTest() { |
+ std::string path_prefix; |
+#if defined(OS_LINUX) |
+ path_prefix = "/dev/socket/"; |
+ std::unique_ptr<base::Environment> env(base::Environment::Create()); |
+ if (env->GetVar(base::env_vars::kHome, &path_prefix)) |
+ path_prefix += "/"; |
+#endif |
+ return path_prefix; |
+} |
+ |
} // namespace remoting |