| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <windows.h> | 5 #include <windows.h> |
| 6 #include <msi.h> | 6 #include <msi.h> |
| 7 #include <shellapi.h> | 7 #include <shellapi.h> |
| 8 #include <shlobj.h> | 8 #include <shlobj.h> |
| 9 | 9 |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 // Check if we need to show the EULA. If it is passed as a command line | 985 // Check if we need to show the EULA. If it is passed as a command line |
| 986 // then the dialog is shown and regardless of the outcome setup exits here. | 986 // then the dialog is shown and regardless of the outcome setup exits here. |
| 987 string16 inner_frame = | 987 string16 inner_frame = |
| 988 cmd_line.GetSwitchValueNative(installer::switches::kShowEula); | 988 cmd_line.GetSwitchValueNative(installer::switches::kShowEula); |
| 989 *exit_code = ShowEULADialog(inner_frame); | 989 *exit_code = ShowEULADialog(inner_frame); |
| 990 if (installer::EULA_REJECTED != *exit_code) { | 990 if (installer::EULA_REJECTED != *exit_code) { |
| 991 GoogleUpdateSettings::SetEULAConsent( | 991 GoogleUpdateSettings::SetEULAConsent( |
| 992 original_state, BrowserDistribution::GetDistribution(), true); | 992 original_state, BrowserDistribution::GetDistribution(), true); |
| 993 } | 993 } |
| 994 } else if (cmd_line.HasSwitch( | 994 } else if (cmd_line.HasSwitch( |
| 995 installer::switches::kConfigureUserSettings)) { |
| 996 DCHECK(installer_state->system_install()); |
| 997 const Product* chrome_install = |
| 998 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); |
| 999 DCHECK(chrome_install); |
| 1000 // TODO(gab): Implement the new shortcut functionality here. |
| 1001 LOG(ERROR) << "--configure-user-settings is not implemented."; |
| 1002 } else if (cmd_line.HasSwitch( |
| 995 installer::switches::kRegisterChromeBrowser)) { | 1003 installer::switches::kRegisterChromeBrowser)) { |
| 996 installer::InstallStatus status = installer::UNKNOWN_STATUS; | 1004 installer::InstallStatus status = installer::UNKNOWN_STATUS; |
| 997 const Product* chrome_install = | 1005 const Product* chrome_install = |
| 998 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); | 1006 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); |
| 999 if (chrome_install) { | 1007 if (chrome_install) { |
| 1000 // If --register-chrome-browser option is specified, register all | 1008 // If --register-chrome-browser option is specified, register all |
| 1001 // Chrome protocol/file associations, as well as register it as a valid | 1009 // Chrome protocol/file associations, as well as register it as a valid |
| 1002 // browser for Start Menu->Internet shortcut. This switch will also | 1010 // browser for Start Menu->Internet shortcut. This switch will also |
| 1003 // register Chrome as a valid handler for a set of URL protocols that | 1011 // register Chrome as a valid handler for a set of URL protocols that |
| 1004 // Chrome may become the default handler for, either by the user marking | 1012 // Chrome may become the default handler for, either by the user marking |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 if (!(installer_state.is_msi() && is_uninstall)) | 1396 if (!(installer_state.is_msi() && is_uninstall)) |
| 1389 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1397 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
| 1390 // to pass through, since this is only returned on uninstall which is | 1398 // to pass through, since this is only returned on uninstall which is |
| 1391 // never invoked directly by Google Update. | 1399 // never invoked directly by Google Update. |
| 1392 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1400 return_code = InstallUtil::GetInstallReturnCode(install_status); |
| 1393 | 1401 |
| 1394 VLOG(1) << "Installation complete, returning: " << return_code; | 1402 VLOG(1) << "Installation complete, returning: " << return_code; |
| 1395 | 1403 |
| 1396 return return_code; | 1404 return return_code; |
| 1397 } | 1405 } |
| OLD | NEW |