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

Unified Diff: remoting/host/setup/daemon_controller_delegate_linux.cc

Issue 2581043002: [Remoting Linux] Allow native messaging host to specify host config path (Closed)
Patch Set: Merge Master Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/setup/daemon_controller_delegate_linux.cc
diff --git a/remoting/host/setup/daemon_controller_delegate_linux.cc b/remoting/host/setup/daemon_controller_delegate_linux.cc
index d18492b13922540af1c4053967ac732df34ae4e4..db9b3933e85a894b988a9d236dfa6490553334f9 100644
--- a/remoting/host/setup/daemon_controller_delegate_linux.cc
+++ b/remoting/host/setup/daemon_controller_delegate_linux.cc
@@ -37,7 +37,15 @@ namespace {
const char kDaemonScript[] =
"/opt/google/chrome-remote-desktop/chrome-remote-desktop";
+// The name of the command-line switch used to specify the host configuration
+// file to use.
+const char kHostConfigSwitchName[] = "host-config";
+
base::FilePath GetConfigPath() {
+ base::CommandLine* current_process = base::CommandLine::ForCurrentProcess();
Sergey Ulanov 2016/12/16 22:22:11 This code runs in native messaging host. How are y
+ if (current_process->HasSwitch(kHostConfigSwitchName)) {
+ return current_process->GetSwitchValuePath(kHostConfigSwitchName);
+ }
std::string filename =
"host#" + base::MD5String(net::GetHostName()) + ".json";
base::FilePath homedir;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698