| Index: chrome/installer/util/auto_launch_util.cc
|
| diff --git a/chrome/installer/util/auto_launch_util.cc b/chrome/installer/util/auto_launch_util.cc
|
| index 08be65d79deb2cc186c50816433c9f3dad32348a..5e797ba58713e4f7dc78e2207d68066a96d28e12 100644
|
| --- a/chrome/installer/util/auto_launch_util.cc
|
| +++ b/chrome/installer/util/auto_launch_util.cc
|
| @@ -185,12 +185,19 @@ void SetWillLaunchAtLogin(const base::FilePath& application_path,
|
|
|
| const base::CommandLine& command_line =
|
| *base::CommandLine::ForCurrentProcess();
|
| +
|
| + // Propagate --user-data-dir if it was specified on the command line.
|
| + // Retrieve the value from the PathService since some sanitation may have
|
| + // taken place. There is no need to add it to the command line in the
|
| + // event that the dir was overridden by Group Policy since the GP override
|
| + // will be in force when Chrome is launched.
|
| if (command_line.HasSwitch(switches::kUserDataDir)) {
|
| cmd_line += ASCIIToUTF16(" --");
|
| cmd_line += ASCIIToUTF16(switches::kUserDataDir);
|
| cmd_line += ASCIIToUTF16("=\"");
|
| - cmd_line +=
|
| - command_line.GetSwitchValuePath(switches::kUserDataDir).value();
|
| + base::FilePath user_data_dir;
|
| + PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
|
| + cmd_line += user_data_dir.value();
|
| cmd_line += ASCIIToUTF16("\"");
|
| }
|
|
|
|
|