| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 } | 501 } |
| 502 | 502 |
| 503 // Check if we need to show the EULA. If it is passed as a command line | 503 // Check if we need to show the EULA. If it is passed as a command line |
| 504 // then the dialog is shown and regardless of the outcome setup exits here. | 504 // then the dialog is shown and regardless of the outcome setup exits here. |
| 505 if (parsed_command_line.HasSwitch(installer_util::switches::kShowEula)) { | 505 if (parsed_command_line.HasSwitch(installer_util::switches::kShowEula)) { |
| 506 return ShowEULADialog(); | 506 return ShowEULADialog(); |
| 507 } | 507 } |
| 508 | 508 |
| 509 // If --register-chrome-browser option is specified, register all | 509 // If --register-chrome-browser option is specified, register all |
| 510 // Chrome protocol/file associations as well as register it as a valid | 510 // Chrome protocol/file associations as well as register it as a valid |
| 511 // browser for StarMenu->Internet shortcut. This option should only | 511 // browser for Start Menu->Internet shortcut. This option should only |
| 512 // be used when setup.exe is launched with admin rights. We do not | 512 // be used when setup.exe is launched with admin rights. We do not |
| 513 // make any user specific changes in this option. | 513 // make any user specific changes in this option. |
| 514 if (parsed_command_line.HasSwitch( | 514 if (parsed_command_line.HasSwitch( |
| 515 installer_util::switches::kRegisterChromeBrowser)) { | 515 installer_util::switches::kRegisterChromeBrowser)) { |
| 516 std::wstring chrome_exe(parsed_command_line.GetSwitchValue( | 516 std::wstring chrome_exe(parsed_command_line.GetSwitchValue( |
| 517 installer_util::switches::kRegisterChromeBrowser)); | 517 installer_util::switches::kRegisterChromeBrowser)); |
| 518 return ShellUtil::AddChromeToSetAccessDefaults(chrome_exe, true); | 518 return ShellUtil::AddChromeToSetAccessDefaults(chrome_exe, true); |
| 519 // If --rename-chrome-exe is specified, we want to rename the executables | 519 // If --rename-chrome-exe is specified, we want to rename the executables |
| 520 // and exit. | 520 // and exit. |
| 521 } else if (parsed_command_line.HasSwitch( | 521 } else if (parsed_command_line.HasSwitch( |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 | 577 |
| 578 install_status = InstallChrome(parsed_command_line, | 578 install_status = InstallChrome(parsed_command_line, |
| 579 installed_version.get(), | 579 installed_version.get(), |
| 580 options); | 580 options); |
| 581 } | 581 } |
| 582 | 582 |
| 583 CoUninitialize(); | 583 CoUninitialize(); |
| 584 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 584 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 585 return dist->GetInstallReturnCode(install_status); | 585 return dist->GetInstallReturnCode(install_status); |
| 586 } | 586 } |
| OLD | NEW |