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

Side by Side Diff: remoting/host/security_key/security_key_ipc_constants.cc

Issue 2167473003: Revert of Renaming Gnubby and RemoteSecurityKey files/classes/members (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "remoting/host/security_key/security_key_ipc_constants.h"
6
7 #include "base/environment.h"
8 #include "base/lazy_instance.h"
9
10 namespace {
11 base::LazyInstance<std::string> g_security_key_ipc_channel_name =
12 LAZY_INSTANCE_INITIALIZER;
13
14 const char kSecurityKeyIpcChannelName[] = "security_key_ipc_channel";
15
16 } // namespace
17
18 namespace remoting {
19
20 extern const char kSecurityKeyConnectionError[] = "ssh_connection_error";
21
22 const std::string& GetSecurityKeyIpcChannelName() {
23 if (g_security_key_ipc_channel_name.Get().empty()) {
24 g_security_key_ipc_channel_name.Get() = kSecurityKeyIpcChannelName;
25 }
26
27 return g_security_key_ipc_channel_name.Get();
28 }
29
30 void SetSecurityKeyIpcChannelNameForTest(const std::string& channel_name) {
31 g_security_key_ipc_channel_name.Get() = channel_name;
32 }
33
34 std::string GetChannelNamePathPrefixForTest() {
35 std::string path_prefix;
36 #if defined(OS_LINUX)
37 path_prefix = "/dev/socket/";
38 std::unique_ptr<base::Environment> env(base::Environment::Create());
39 if (env->GetVar(base::env_vars::kHome, &path_prefix))
40 path_prefix += "/";
41 #endif
42 return path_prefix;
43 }
44
45 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/security_key/security_key_ipc_constants.h ('k') | remoting/host/security_key/security_key_ipc_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698