| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 #include <windows.h> | 6 #include <windows.h> |
| 7 #include <msi.h> | 7 #include <msi.h> |
| 8 #include <shlobj.h> | 8 #include <shlobj.h> |
| 9 | 9 |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 // If we failed to construct install path, it means the OS call to | 263 // If we failed to construct install path, it means the OS call to |
| 264 // get %ProgramFiles% or %AppData% failed. Report this as failure. | 264 // get %ProgramFiles% or %AppData% failed. Report this as failure. |
| 265 install_msg_base = IDS_INSTALL_OS_ERROR_BASE; | 265 install_msg_base = IDS_INSTALL_OS_ERROR_BASE; |
| 266 install_status = installer_util::OS_ERROR; | 266 install_status = installer_util::OS_ERROR; |
| 267 } else { | 267 } else { |
| 268 file_util::AppendToPath(&chrome_exe, installer_util::kChromeExe); | 268 file_util::AppendToPath(&chrome_exe, installer_util::kChromeExe); |
| 269 chrome_exe = L"\"" + chrome_exe + L"\""; | 269 chrome_exe = L"\"" + chrome_exe + L"\""; |
| 270 install_msg_base = 0; | 270 install_msg_base = 0; |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 |
| 274 bool write_chrome_launch_string = |
| 275 !installer_util::GetDistroBooleanPreference(prefs, |
| 276 installer_util::master_preferences::kDoNotRegisterForUpdateLaunch); |
| 277 |
| 273 InstallUtil::WriteInstallerResult(system_level, install_status, | 278 InstallUtil::WriteInstallerResult(system_level, install_status, |
| 274 install_msg_base, &chrome_exe); | 279 install_msg_base, write_chrome_launch_string ? &chrome_exe : NULL); |
| 280 |
| 275 if (install_status == installer_util::FIRST_INSTALL_SUCCESS) { | 281 if (install_status == installer_util::FIRST_INSTALL_SUCCESS) { |
| 276 LOG(INFO) << "First install successful."; | 282 LOG(INFO) << "First install successful."; |
| 277 // We never want to launch Chrome in system level install mode. | 283 // We never want to launch Chrome in system level install mode. |
| 278 if (!system_level && !installer_util::GetDistroBooleanPreference(prefs
, | 284 if (!system_level && !installer_util::GetDistroBooleanPreference(prefs
, |
| 279 installer_util::master_preferences::kDoNotLaunchChrome)) | 285 installer_util::master_preferences::kDoNotLaunchChrome)) |
| 280 installer::LaunchChrome(system_level); | 286 installer::LaunchChrome(system_level); |
| 281 } | 287 } |
| 282 } | 288 } |
| 283 } | 289 } |
| 284 // There might be an experiment (for upgrade usually) that needs to happen. | 290 // There might be an experiment (for upgrade usually) that needs to happen. |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 } else { | 544 } else { |
| 539 install_status = InstallChrome(parsed_command_line, | 545 install_status = InstallChrome(parsed_command_line, |
| 540 installed_version.get(), | 546 installed_version.get(), |
| 541 prefs.get()); | 547 prefs.get()); |
| 542 } | 548 } |
| 543 | 549 |
| 544 CoUninitialize(); | 550 CoUninitialize(); |
| 545 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 551 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 546 return dist->GetInstallReturnCode(install_status); | 552 return dist->GetInstallReturnCode(install_status); |
| 547 } | 553 } |
| OLD | NEW |