Commit 4c89579a authored by calamity@chromium.org's avatar calamity@chromium.org

Use path service for chrome_exe instead of current command line.

Fix an oversight where the current command line's program was being used
instead of getting the program from PathService.

BUG=

Review URL: https://chromiumcodereview.appspot.com/14011005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194772 0039d316-1c4b-4281-b951-d872f2087c98
parent 9d120f81
......@@ -89,7 +89,12 @@ const int kAppListIconIndex = 1;
CommandLine GetAppListCommandLine() {
const char* const kSwitchesToCopy[] = { switches::kUserDataDir };
CommandLine* current = CommandLine::ForCurrentProcess();
CommandLine command_line(current->GetProgram());
base::FilePath chrome_exe;
if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
NOTREACHED();
return CommandLine(CommandLine::NO_PROGRAM);
}
CommandLine command_line(chrome_exe);
command_line.CopySwitchesFrom(*current, kSwitchesToCopy,
arraysize(kSwitchesToCopy));
command_line.AppendSwitch(switches::kShowAppList);
......
......@@ -96,7 +96,7 @@ void CreateIconAndSetRelaunchDetails(
NOTREACHED();
return;
}
command_line.SetProgram(CommandLine::ForCurrentProcess()->GetProgram());
command_line.SetProgram(chrome_exe);
ui::win::SetRelaunchDetailsForWindow(command_line.GetCommandLineString(),
shortcut_info.title, hwnd);
......
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