summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_main.cc9
-rwxr-xr-xchrome/browser/first_run.cc9
2 files changed, 10 insertions, 8 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index c09f99f..bc25e95 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -220,12 +220,17 @@ int BrowserMain(const MainFunctionParams& parameters) {
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
MessageWindow message_window(user_data_dir);
+ bool is_first_run = FirstRun::IsChromeFirstRun() ||
+ parsed_command_line.HasSwitch(switches::kFirstRun);
+ bool first_run_ui_bypass = false;
+
scoped_ptr<BrowserProcess> browser_process;
if (parsed_command_line.HasSwitch(switches::kImport)) {
// We use different BrowserProcess when importing so no GoogleURLTracker is
// instantiated (as it makes a URLRequest and we don't have an IO thread,
// see bug #1292702).
browser_process.reset(new FirstRunBrowserProcess(parsed_command_line));
+ is_first_run = false;
} else {
browser_process.reset(new BrowserProcessImpl(parsed_command_line));
}
@@ -242,10 +247,6 @@ int BrowserMain(const MainFunctionParams& parameters) {
PrefService* local_state = browser_process->local_state();
DCHECK(local_state);
- bool is_first_run = FirstRun::IsChromeFirstRun() ||
- parsed_command_line.HasSwitch(switches::kFirstRun);
- bool first_run_ui_bypass = false;
-
// Initialize ResourceBundle which handles files loaded from external
// sources. This has to be done before uninstall code path and before prefs
// are registered.
diff --git a/chrome/browser/first_run.cc b/chrome/browser/first_run.cc
index 21e29f9..ec747a2 100755
--- a/chrome/browser/first_run.cc
+++ b/chrome/browser/first_run.cc
@@ -116,12 +116,13 @@ bool InvokeGoogleUpdateForRename() {
}
bool LaunchSetupWithParam(const std::wstring& param, int* ret_code) {
- std::wstring exe_path;
- if (!PathService::Get(base::DIR_EXE, &exe_path))
+ FilePath exe_path;
+ if (!PathService::Get(base::DIR_MODULE, &exe_path))
return false;
- file_util::AppendToPath(&exe_path, installer_util::kSetupExe);
+ exe_path.Append(installer_util::kInstallerDir);
+ exe_path.Append(installer_util::kSetupExe);
base::ProcessHandle ph;
- CommandLine cl(exe_path);
+ CommandLine cl(exe_path.ToWStringHack());
cl.AppendSwitch(param);
if (!base::LaunchApp(cl, false, false, &ph))
return false;