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

Unified Diff: remoting/tools/register_local_nm_hosts.sh

Issue 946723002: Made register_local_nm_hosts.sh honor $CHROME_USER_DATA_DIR. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« 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/tools/register_local_nm_hosts.sh
diff --git a/remoting/tools/register_local_nm_hosts.sh b/remoting/tools/register_local_nm_hosts.sh
index 8a0b2537f1d1774e19b8907b17303a4258424b15..aba87ef04b9578b62050e4960c896b7ae4647774 100755
--- a/remoting/tools/register_local_nm_hosts.sh
+++ b/remoting/tools/register_local_nm_hosts.sh
@@ -46,7 +46,10 @@ register_hosts() {
register_hosts_for_all_channels() {
local build_dir="$1"
- if [ $(uname -s) == "Darwin" ]; then
+ if [ -n "$CHROME_USER_DATA_DIR" ]; then
+ register_hosts "${build_dir}" \
+ "${CHROME_USER_DATA_DIR}/NativeMessagingHosts"
+ elif [ $(uname -s) == "Darwin" ]; then
register_hosts "${build_dir}" \
"${HOME}/Library/Application Support/Google/Chrome/NativeMessagingHosts"
register_hosts "${build_dir}" \
@@ -71,7 +74,10 @@ unregister_hosts() {
}
unregister_hosts_for_all_channels() {
- if [ $(uname -s) == "Darwin" ]; then
+ if [ -n "$CHROME_USER_DATA_DIR" ]; then
+ unregister_hosts \
+ "${CHROME_USER_DATA_DIR}/NativeMessagingHosts"
+ elif [ $(uname -s) == "Darwin" ]; then
unregister_hosts \
"${HOME}/Library/Application Support/Google/Chrome/NativeMessagingHosts"
unregister_hosts \
« 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