diff options
author | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-30 20:40:59 +0000 |
---|---|---|
committer | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-30 20:40:59 +0000 |
commit | d5d29be4f557ec5e05ad72f1ce1ea52824d16fa9 (patch) | |
tree | bfa36defc8c9fae43e63740eac7d41eb6fa5136a /chrome/installer | |
parent | 93f018685c3a0c71955a9f903baa458e20b25833 (diff) | |
download | chromium_src-d5d29be4f557ec5e05ad72f1ce1ea52824d16fa9.zip chromium_src-d5d29be4f557ec5e05ad72f1ce1ea52824d16fa9.tar.gz chromium_src-d5d29be4f557ec5e05ad72f1ce1ea52824d16fa9.tar.bz2 |
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
Diffstat (limited to 'chrome/installer')
-rwxr-xr-x | chrome/installer/linux/common/wrapper | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/installer/linux/common/wrapper b/chrome/installer/linux/common/wrapper index 22d642fd..4194365 100755 --- a/chrome/installer/linux/common/wrapper +++ b/chrome/installer/linux/common/wrapper @@ -48,5 +48,12 @@ if [[ -n "@@SXS_USER_DATA_DIR@@" ]]; then 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. -exec -a "$0" "$HERE/@@PROGNAME@@" @@DEFAULT_FLAGS@@ "$@" +exec -a "$0" "$HERE/@@PROGNAME@@" @@DEFAULT_FLAGS@@ "$PROFILE_DIRECTORY_FLAG" \ + "$@" |