Index: chrome/browser/first_run.cc |
diff --git a/chrome/browser/first_run.cc b/chrome/browser/first_run.cc |
index c6f4f29fe0507259fbaf693cfe046f432788c84a..8522a8bab8e31c3436aeea12a8b8e904325d3fef 100755 |
--- a/chrome/browser/first_run.cc |
+++ b/chrome/browser/first_run.cc |
@@ -450,8 +450,8 @@ bool DecodeImportParams(const std::wstring& encoded, |
bool FirstRun::ImportSettings(Profile* profile, int browser, |
int items_to_import, HWND parent_window) { |
- CommandLine cmdline; |
- std::wstring import_cmd(cmdline.program()); |
+ const CommandLine& cmdline = *CommandLine::ForCurrentProcess(); |
+ CommandLine import_cmd(cmdline.program()); |
// Propagate the following switches to the importer command line. |
static const wchar_t* const switch_names[] = { |
switches::kUserDataDir, |
@@ -459,12 +459,12 @@ bool FirstRun::ImportSettings(Profile* profile, int browser, |
}; |
for (int i = 0; i < arraysize(switch_names); ++i) { |
if (cmdline.HasSwitch(switch_names[i])) { |
- CommandLine::AppendSwitchWithValue( |
- &import_cmd, switch_names[i], |
+ import_cmd.AppendSwitchWithValue( |
+ switch_names[i], |
cmdline.GetSwitchValue(switch_names[i])); |
} |
} |
- CommandLine::AppendSwitchWithValue(&import_cmd, switches::kImport, |
+ import_cmd.CommandLine::AppendSwitchWithValue(switches::kImport, |
EncodeImportParams(browser, items_to_import, parent_window)); |
// Time to launch the process that is going to do the import. |