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

Side by Side 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, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "remoting/host/security_key/remote_security_key_ipc_constants.h" 5 #include "remoting/host/security_key/remote_security_key_ipc_constants.h"
6 6
7 #include "base/environment.h"
7 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
8 9
9 namespace { 10 namespace {
10 base::LazyInstance<std::string> g_remote_security_key_ipc_channel_name = 11 base::LazyInstance<std::string> g_remote_security_key_ipc_channel_name =
11 LAZY_INSTANCE_INITIALIZER; 12 LAZY_INSTANCE_INITIALIZER;
12 13
13 const char kRemoteSecurityKeyIpcChannelName[] = 14 const char kRemoteSecurityKeyIpcChannelName[] =
14 "remote_security_key_ipc_channel"; 15 "remote_security_key_ipc_channel";
15 16
16 } // namespace 17 } // namespace
(...skipping 10 matching lines...) Expand all
27 } 28 }
28 29
29 return g_remote_security_key_ipc_channel_name.Get(); 30 return g_remote_security_key_ipc_channel_name.Get();
30 } 31 }
31 32
32 void SetRemoteSecurityKeyIpcChannelNameForTest( 33 void SetRemoteSecurityKeyIpcChannelNameForTest(
33 const std::string& channel_name) { 34 const std::string& channel_name) {
34 g_remote_security_key_ipc_channel_name.Get() = channel_name; 35 g_remote_security_key_ipc_channel_name.Get() = channel_name;
35 } 36 }
36 37
38 std::string GetChannelNamePathPrefixForTest() {
39 std::string path_prefix;
40 #if defined(OS_LINUX)
41 path_prefix = "/dev/socket/";
42 std::unique_ptr<base::Environment> env(base::Environment::Create());
43 if (env->GetVar(base::env_vars::kHome, &path_prefix))
44 path_prefix += "/";
45 #endif
46 return path_prefix;
47 }
48
37 } // namespace remoting 49 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698