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

Unified Diff: remoting/host/security_key/remote_security_key_ipc_constants.cc

Issue 2003753002: Fix remoting_unittests that are failing on 32-bit linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed g_type_init changes Created 4 years, 7 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
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

Powered by Google App Engine
This is Rietveld 408576698