Respect CHROME_USER_DATA_DIR in start-up scripts.

This change allows CHROME_USER_DATA_DIR to override the default profile location
is Chrome is launched via a start-up script. The behaviour is unchanged if that
environment variable is not set.

BUG=351002

Review URL: https://codereview.chromium.org/190473005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260461 0039d316-1c4b-4281-b951-d872f2087c98
parent 93f01868
...@@ -48,5 +48,12 @@ if [[ -n "@@SXS_USER_DATA_DIR@@" ]]; then ...@@ -48,5 +48,12 @@ if [[ -n "@@SXS_USER_DATA_DIR@@" ]]; then
fi fi
fi fi
# Make sure that the profile directory specified in the environment, if any,
# overrides the default.
if [[ -n "$CHROME_USER_DATA_DIR" ]]; then
PROFILE_DIRECTORY_FLAG="--user-data-dir=$CHROME_USER_DATA_DIR"
fi
# Note: exec -a below is a bashism. # Note: exec -a below is a bashism.
exec -a "$0" "$HERE/@@PROGNAME@@" @@DEFAULT_FLAGS@@ "$@" exec -a "$0" "$HERE/@@PROGNAME@@" @@DEFAULT_FLAGS@@ "$PROFILE_DIRECTORY_FLAG" \
"$@"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment