Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: chrome/installer/setup/setup_main.cc

Issue 94013004: Add base:: to string16s in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try again Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | chrome/installer/setup/uninstall.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/installer/setup/setup_main.h" 5 #include "chrome/installer/setup/setup_main.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <msi.h> 8 #include <msi.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 install_list.get()); 257 install_list.get());
258 } 258 }
259 // old_chrome.exe is still in use in most cases, so ignore failures here. 259 // old_chrome.exe is still in use in most cases, so ignore failures here.
260 install_list->AddDeleteTreeWorkItem(chrome_old_exe, temp_path.path())-> 260 install_list->AddDeleteTreeWorkItem(chrome_old_exe, temp_path.path())->
261 set_ignore_failure(true); 261 set_ignore_failure(true);
262 262
263 // Add work items to delete the "opv", "cpv", and "cmd" values from all 263 // Add work items to delete the "opv", "cpv", and "cmd" values from all
264 // products we're operating on (which including the multi-install binaries). 264 // products we're operating on (which including the multi-install binaries).
265 const Products& products = installer_state->products(); 265 const Products& products = installer_state->products();
266 HKEY reg_root = installer_state->root_key(); 266 HKEY reg_root = installer_state->root_key();
267 string16 version_key; 267 base::string16 version_key;
268 for (Products::const_iterator it = products.begin(); it < products.end(); 268 for (Products::const_iterator it = products.begin(); it < products.end();
269 ++it) { 269 ++it) {
270 version_key = (*it)->distribution()->GetVersionKey(); 270 version_key = (*it)->distribution()->GetVersionKey();
271 install_list->AddDeleteRegValueWorkItem( 271 install_list->AddDeleteRegValueWorkItem(
272 reg_root, version_key, google_update::kRegOldVersionField); 272 reg_root, version_key, google_update::kRegOldVersionField);
273 install_list->AddDeleteRegValueWorkItem( 273 install_list->AddDeleteRegValueWorkItem(
274 reg_root, version_key, google_update::kRegCriticalVersionField); 274 reg_root, version_key, google_update::kRegCriticalVersionField);
275 install_list->AddDeleteRegValueWorkItem( 275 install_list->AddDeleteRegValueWorkItem(
276 reg_root, version_key, google_update::kRegRenameCmdField); 276 reg_root, version_key, google_update::kRegRenameCmdField);
277 } 277 }
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 (*it)->distribution()->UpdateInstallStatus( 854 (*it)->distribution()->UpdateInstallStatus(
855 system_install, archive_type, install_status); 855 system_install, archive_type, install_status);
856 } 856 }
857 857
858 UninstallBinariesIfUnused(original_state, *installer_state, &install_status); 858 UninstallBinariesIfUnused(original_state, *installer_state, &install_status);
859 859
860 installer_state->UpdateStage(installer::NO_STAGE); 860 installer_state->UpdateStage(installer::NO_STAGE);
861 return install_status; 861 return install_status;
862 } 862 }
863 863
864 installer::InstallStatus ShowEULADialog(const string16& inner_frame) { 864 installer::InstallStatus ShowEULADialog(const base::string16& inner_frame) {
865 VLOG(1) << "About to show EULA"; 865 VLOG(1) << "About to show EULA";
866 string16 eula_path = installer::GetLocalizedEulaResource(); 866 base::string16 eula_path = installer::GetLocalizedEulaResource();
867 if (eula_path.empty()) { 867 if (eula_path.empty()) {
868 LOG(ERROR) << "No EULA path available"; 868 LOG(ERROR) << "No EULA path available";
869 return installer::EULA_REJECTED; 869 return installer::EULA_REJECTED;
870 } 870 }
871 // Newer versions of the caller pass an inner frame parameter that must 871 // Newer versions of the caller pass an inner frame parameter that must
872 // be given to the html page being launched. 872 // be given to the html page being launched.
873 installer::EulaHTMLDialog dlg(eula_path, inner_frame); 873 installer::EulaHTMLDialog dlg(eula_path, inner_frame);
874 installer::EulaHTMLDialog::Outcome outcome = dlg.ShowModal(); 874 installer::EulaHTMLDialog::Outcome outcome = dlg.ShowModal();
875 if (installer::EulaHTMLDialog::REJECTED == outcome) { 875 if (installer::EulaHTMLDialog::REJECTED == outcome) {
876 LOG(ERROR) << "EULA rejected or EULA failure"; 876 LOG(ERROR) << "EULA rejected or EULA failure";
(...skipping 20 matching lines...) Expand all
897 file_util::WriteFile(eula_sentinel, "", 0) != -1); 897 file_util::WriteFile(eula_sentinel, "", 0) != -1);
898 } 898 }
899 899
900 void ActivateMetroChrome() { 900 void ActivateMetroChrome() {
901 // Check to see if we're per-user or not. Need to do this since we may 901 // Check to see if we're per-user or not. Need to do this since we may
902 // not have been invoked with --system-level even for a machine install. 902 // not have been invoked with --system-level even for a machine install.
903 wchar_t exe_path[MAX_PATH * 2] = {}; 903 wchar_t exe_path[MAX_PATH * 2] = {};
904 GetModuleFileName(NULL, exe_path, arraysize(exe_path)); 904 GetModuleFileName(NULL, exe_path, arraysize(exe_path));
905 bool is_per_user_install = InstallUtil::IsPerUserInstall(exe_path); 905 bool is_per_user_install = InstallUtil::IsPerUserInstall(exe_path);
906 906
907 string16 app_model_id = 907 base::string16 app_model_id = ShellUtil::GetBrowserModelId(
908 ShellUtil::GetBrowserModelId(BrowserDistribution::GetDistribution(), 908 BrowserDistribution::GetDistribution(), is_per_user_install);
909 is_per_user_install);
910 909
911 base::win::ScopedComPtr<IApplicationActivationManager> activator; 910 base::win::ScopedComPtr<IApplicationActivationManager> activator;
912 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager); 911 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager);
913 if (SUCCEEDED(hr)) { 912 if (SUCCEEDED(hr)) {
914 DWORD pid = 0; 913 DWORD pid = 0;
915 hr = activator->ActivateApplication( 914 hr = activator->ActivateApplication(
916 app_model_id.c_str(), L"open", AO_NONE, &pid); 915 app_model_id.c_str(), L"open", AO_NONE, &pid);
917 } 916 }
918 917
919 LOG_IF(ERROR, FAILED(hr)) << "Tried and failed to launch Metro Chrome. " 918 LOG_IF(ERROR, FAILED(hr)) << "Tried and failed to launch Metro Chrome. "
(...skipping 14 matching lines...) Expand all
934 original_state.GetProductState(false, 933 original_state.GetProductState(false,
935 BrowserDistribution::CHROME_BROWSER); 934 BrowserDistribution::CHROME_BROWSER);
936 if (!existing_chrome) { 935 if (!existing_chrome) {
937 existing_chrome = 936 existing_chrome =
938 original_state.GetProductState(true, BrowserDistribution::CHROME_BROWSER); 937 original_state.GetProductState(true, BrowserDistribution::CHROME_BROWSER);
939 } 938 }
940 if (existing_chrome) { 939 if (existing_chrome) {
941 static const wchar_t kPleaseUninstallYourChromeMessage[] = 940 static const wchar_t kPleaseUninstallYourChromeMessage[] =
942 L"You already have a full-installation (non-dev) of %1ls, please " 941 L"You already have a full-installation (non-dev) of %1ls, please "
943 L"uninstall it first using Add/Remove Programs in the control panel."; 942 L"uninstall it first using Add/Remove Programs in the control panel.";
944 string16 name(chrome_dist->GetDisplayName()); 943 base::string16 name(chrome_dist->GetDisplayName());
945 string16 message(base::StringPrintf(kPleaseUninstallYourChromeMessage, 944 base::string16 message(
946 name.c_str())); 945 base::StringPrintf(kPleaseUninstallYourChromeMessage, name.c_str()));
947 946
948 LOG(ERROR) << "Aborting operation: another installation of " << name 947 LOG(ERROR) << "Aborting operation: another installation of " << name
949 << " was found, as a last resort (if the product is not present " 948 << " was found, as a last resort (if the product is not present "
950 "in Add/Remove Programs), try executing: " 949 "in Add/Remove Programs), try executing: "
951 << existing_chrome->uninstall_command().GetCommandLineString(); 950 << existing_chrome->uninstall_command().GetCommandLineString();
952 MessageBox(NULL, message.c_str(), NULL, MB_ICONERROR); 951 MessageBox(NULL, message.c_str(), NULL, MB_ICONERROR);
953 return installer::INSTALL_FAILED; 952 return installer::INSTALL_FAILED;
954 } 953 }
955 954
956 base::FilePath chrome_exe( 955 base::FilePath chrome_exe(
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 if (*exit_code) { 1040 if (*exit_code) {
1042 LOG(WARNING) << "setup.exe patching failed."; 1041 LOG(WARNING) << "setup.exe patching failed.";
1043 installer_state->WriteInstallerResult( 1042 installer_state->WriteInstallerResult(
1044 status, IDS_SETUP_PATCH_FAILED_BASE, NULL); 1043 status, IDS_SETUP_PATCH_FAILED_BASE, NULL);
1045 } 1044 }
1046 // We will be exiting normally, so clear the stage indicator. 1045 // We will be exiting normally, so clear the stage indicator.
1047 installer_state->UpdateStage(installer::NO_STAGE); 1046 installer_state->UpdateStage(installer::NO_STAGE);
1048 } else if (cmd_line.HasSwitch(installer::switches::kShowEula)) { 1047 } else if (cmd_line.HasSwitch(installer::switches::kShowEula)) {
1049 // Check if we need to show the EULA. If it is passed as a command line 1048 // Check if we need to show the EULA. If it is passed as a command line
1050 // then the dialog is shown and regardless of the outcome setup exits here. 1049 // then the dialog is shown and regardless of the outcome setup exits here.
1051 string16 inner_frame = 1050 base::string16 inner_frame =
1052 cmd_line.GetSwitchValueNative(installer::switches::kShowEula); 1051 cmd_line.GetSwitchValueNative(installer::switches::kShowEula);
1053 *exit_code = ShowEULADialog(inner_frame); 1052 *exit_code = ShowEULADialog(inner_frame);
1054 1053
1055 if (installer::EULA_REJECTED != *exit_code) { 1054 if (installer::EULA_REJECTED != *exit_code) {
1056 if (GoogleUpdateSettings::SetEULAConsent( 1055 if (GoogleUpdateSettings::SetEULAConsent(
1057 original_state, BrowserDistribution::GetDistribution(), true)) { 1056 original_state, BrowserDistribution::GetDistribution(), true)) {
1058 CreateEULASentinel(BrowserDistribution::GetDistribution()); 1057 CreateEULASentinel(BrowserDistribution::GetDistribution());
1059 } 1058 }
1060 // For a metro-originated launch, we now need to launch back into metro. 1059 // For a metro-originated launch, we now need to launch back into metro.
1061 if (cmd_line.HasSwitch(installer::switches::kShowEulaForMetro)) 1060 if (cmd_line.HasSwitch(installer::switches::kShowEulaForMetro))
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 // control panel settings, or through website use of 1096 // control panel settings, or through website use of
1098 // registerProtocolHandler. These protocols are found in 1097 // registerProtocolHandler. These protocols are found in
1099 // ShellUtil::kPotentialProtocolAssociations. 1098 // ShellUtil::kPotentialProtocolAssociations.
1100 // The --register-url-protocol will additionally register Chrome as a 1099 // The --register-url-protocol will additionally register Chrome as a
1101 // potential handler for the supplied protocol, and is used if a website 1100 // potential handler for the supplied protocol, and is used if a website
1102 // registers a handler for a protocol not found in 1101 // registers a handler for a protocol not found in
1103 // ShellUtil::kPotentialProtocolAssociations. 1102 // ShellUtil::kPotentialProtocolAssociations.
1104 // These options should only be used when setup.exe is launched with admin 1103 // These options should only be used when setup.exe is launched with admin
1105 // rights. We do not make any user specific changes with this option. 1104 // rights. We do not make any user specific changes with this option.
1106 DCHECK(IsUserAnAdmin()); 1105 DCHECK(IsUserAnAdmin());
1107 string16 chrome_exe(cmd_line.GetSwitchValueNative( 1106 base::string16 chrome_exe(cmd_line.GetSwitchValueNative(
1108 installer::switches::kRegisterChromeBrowser)); 1107 installer::switches::kRegisterChromeBrowser));
1109 string16 suffix; 1108 base::string16 suffix;
1110 if (cmd_line.HasSwitch( 1109 if (cmd_line.HasSwitch(
1111 installer::switches::kRegisterChromeBrowserSuffix)) { 1110 installer::switches::kRegisterChromeBrowserSuffix)) {
1112 suffix = cmd_line.GetSwitchValueNative( 1111 suffix = cmd_line.GetSwitchValueNative(
1113 installer::switches::kRegisterChromeBrowserSuffix); 1112 installer::switches::kRegisterChromeBrowserSuffix);
1114 } 1113 }
1115 if (cmd_line.HasSwitch(installer::switches::kRegisterURLProtocol)) { 1114 if (cmd_line.HasSwitch(installer::switches::kRegisterURLProtocol)) {
1116 string16 protocol = cmd_line.GetSwitchValueNative( 1115 base::string16 protocol = cmd_line.GetSwitchValueNative(
1117 installer::switches::kRegisterURLProtocol); 1116 installer::switches::kRegisterURLProtocol);
1118 // ShellUtil::RegisterChromeForProtocol performs all registration 1117 // ShellUtil::RegisterChromeForProtocol performs all registration
1119 // done by ShellUtil::RegisterChromeBrowser, as well as registering 1118 // done by ShellUtil::RegisterChromeBrowser, as well as registering
1120 // with Windows as capable of handling the supplied protocol. 1119 // with Windows as capable of handling the supplied protocol.
1121 if (ShellUtil::RegisterChromeForProtocol( 1120 if (ShellUtil::RegisterChromeForProtocol(
1122 chrome_install->distribution(), chrome_exe, suffix, protocol, 1121 chrome_install->distribution(), chrome_exe, suffix, protocol,
1123 false)) 1122 false))
1124 status = installer::IN_USE_UPDATED; 1123 status = installer::IN_USE_UPDATED;
1125 } else { 1124 } else {
1126 if (ShellUtil::RegisterChromeBrowser(chrome_install->distribution(), 1125 if (ShellUtil::RegisterChromeBrowser(chrome_install->distribution(),
1127 chrome_exe, suffix, false)) 1126 chrome_exe, suffix, false))
1128 status = installer::IN_USE_UPDATED; 1127 status = installer::IN_USE_UPDATED;
1129 } 1128 }
1130 } else { 1129 } else {
1131 LOG(DFATAL) << "Can't register browser - Chrome distribution not found"; 1130 LOG(DFATAL) << "Can't register browser - Chrome distribution not found";
1132 } 1131 }
1133 *exit_code = InstallUtil::GetInstallReturnCode(status); 1132 *exit_code = InstallUtil::GetInstallReturnCode(status);
1134 } else if (cmd_line.HasSwitch(installer::switches::kRenameChromeExe)) { 1133 } else if (cmd_line.HasSwitch(installer::switches::kRenameChromeExe)) {
1135 // If --rename-chrome-exe is specified, we want to rename the executables 1134 // If --rename-chrome-exe is specified, we want to rename the executables
1136 // and exit. 1135 // and exit.
1137 *exit_code = RenameChromeExecutables(original_state, installer_state); 1136 *exit_code = RenameChromeExecutables(original_state, installer_state);
1138 } else if (cmd_line.HasSwitch( 1137 } else if (cmd_line.HasSwitch(
1139 installer::switches::kRemoveChromeRegistration)) { 1138 installer::switches::kRemoveChromeRegistration)) {
1140 // This is almost reverse of --register-chrome-browser option above. 1139 // This is almost reverse of --register-chrome-browser option above.
1141 // Here we delete Chrome browser registration. This option should only 1140 // Here we delete Chrome browser registration. This option should only
1142 // be used when setup.exe is launched with admin rights. We do not 1141 // be used when setup.exe is launched with admin rights. We do not
1143 // make any user specific changes in this option. 1142 // make any user specific changes in this option.
1144 string16 suffix; 1143 base::string16 suffix;
1145 if (cmd_line.HasSwitch( 1144 if (cmd_line.HasSwitch(
1146 installer::switches::kRegisterChromeBrowserSuffix)) { 1145 installer::switches::kRegisterChromeBrowserSuffix)) {
1147 suffix = cmd_line.GetSwitchValueNative( 1146 suffix = cmd_line.GetSwitchValueNative(
1148 installer::switches::kRegisterChromeBrowserSuffix); 1147 installer::switches::kRegisterChromeBrowserSuffix);
1149 } 1148 }
1150 installer::InstallStatus tmp = installer::UNKNOWN_STATUS; 1149 installer::InstallStatus tmp = installer::UNKNOWN_STATUS;
1151 const Product* chrome_install = 1150 const Product* chrome_install =
1152 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); 1151 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER);
1153 DCHECK(chrome_install); 1152 DCHECK(chrome_install);
1154 if (chrome_install) { 1153 if (chrome_install) {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 1270
1272 // Popup a dialog that will prompt to reboot using the default system message. 1271 // Popup a dialog that will prompt to reboot using the default system message.
1273 // TODO(robertshield): Add a localized, more specific string to the prompt. 1272 // TODO(robertshield): Add a localized, more specific string to the prompt.
1274 RestartDialog(NULL, NULL, EWX_REBOOT | EWX_FORCEIFHUNG); 1273 RestartDialog(NULL, NULL, EWX_REBOOT | EWX_FORCEIFHUNG);
1275 return true; 1274 return true;
1276 } 1275 }
1277 1276
1278 // Returns the Custom information for the client identified by the exe path 1277 // Returns the Custom information for the client identified by the exe path
1279 // passed in. This information is used for crash reporting. 1278 // passed in. This information is used for crash reporting.
1280 google_breakpad::CustomClientInfo* GetCustomInfo(const wchar_t* exe_path) { 1279 google_breakpad::CustomClientInfo* GetCustomInfo(const wchar_t* exe_path) {
1281 string16 product; 1280 base::string16 product;
1282 string16 version; 1281 base::string16 version;
1283 scoped_ptr<FileVersionInfo> version_info( 1282 scoped_ptr<FileVersionInfo> version_info(
1284 FileVersionInfo::CreateFileVersionInfo(base::FilePath(exe_path))); 1283 FileVersionInfo::CreateFileVersionInfo(base::FilePath(exe_path)));
1285 if (version_info.get()) { 1284 if (version_info.get()) {
1286 version = version_info->product_version(); 1285 version = version_info->product_version();
1287 product = version_info->product_short_name(); 1286 product = version_info->product_short_name();
1288 } 1287 }
1289 1288
1290 if (version.empty()) 1289 if (version.empty())
1291 version = L"0.1.0.0"; 1290 version = L"0.1.0.0";
1292 1291
(...skipping 24 matching lines...) Expand all
1317 base::FilePath temp_directory; 1316 base::FilePath temp_directory;
1318 if (!base::GetTempDir(&temp_directory) || temp_directory.empty()) 1317 if (!base::GetTempDir(&temp_directory) || temp_directory.empty())
1319 return NULL; 1318 return NULL;
1320 1319
1321 wchar_t exe_path[MAX_PATH * 2] = {0}; 1320 wchar_t exe_path[MAX_PATH * 2] = {0};
1322 GetModuleFileName(NULL, exe_path, arraysize(exe_path)); 1321 GetModuleFileName(NULL, exe_path, arraysize(exe_path));
1323 1322
1324 // Build the pipe name. It can be either: 1323 // Build the pipe name. It can be either:
1325 // System-wide install: "NamedPipe\GoogleCrashServices\S-1-5-18" 1324 // System-wide install: "NamedPipe\GoogleCrashServices\S-1-5-18"
1326 // Per-user install: "NamedPipe\GoogleCrashServices\<user SID>" 1325 // Per-user install: "NamedPipe\GoogleCrashServices\<user SID>"
1327 string16 user_sid = kSystemPrincipalSid; 1326 base::string16 user_sid = kSystemPrincipalSid;
1328 1327
1329 if (!system_install) { 1328 if (!system_install) {
1330 if (!base::win::GetUserSidString(&user_sid)) { 1329 if (!base::win::GetUserSidString(&user_sid)) {
1331 return NULL; 1330 return NULL;
1332 } 1331 }
1333 } 1332 }
1334 1333
1335 string16 pipe_name = kGoogleUpdatePipeName; 1334 base::string16 pipe_name = kGoogleUpdatePipeName;
1336 pipe_name += user_sid; 1335 pipe_name += user_sid;
1337 1336
1338 google_breakpad::ExceptionHandler* breakpad = 1337 google_breakpad::ExceptionHandler* breakpad =
1339 new google_breakpad::ExceptionHandler( 1338 new google_breakpad::ExceptionHandler(
1340 temp_directory.value(), NULL, NULL, NULL, 1339 temp_directory.value(), NULL, NULL, NULL,
1341 google_breakpad::ExceptionHandler::HANDLER_ALL, kLargerDumpType, 1340 google_breakpad::ExceptionHandler::HANDLER_ALL, kLargerDumpType,
1342 pipe_name.c_str(), GetCustomInfo(exe_path)); 1341 pipe_name.c_str(), GetCustomInfo(exe_path));
1343 return breakpad; 1342 return breakpad;
1344 } 1343 }
1345 1344
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 1591
1593 if (proceed_with_installation) { 1592 if (proceed_with_installation) {
1594 base::FilePath prefs_source_path(cmd_line.GetSwitchValueNative( 1593 base::FilePath prefs_source_path(cmd_line.GetSwitchValueNative(
1595 switches::kInstallerData)); 1594 switches::kInstallerData));
1596 install_status = InstallOrUpdateProduct( 1595 install_status = InstallOrUpdateProduct(
1597 original_state, installer_state, cmd_line.GetProgram(), 1596 original_state, installer_state, cmd_line.GetProgram(),
1598 uncompressed_archive, temp_path.path(), src_path, prefs_source_path, 1597 uncompressed_archive, temp_path.path(), src_path, prefs_source_path,
1599 prefs, *installer_version); 1598 prefs, *installer_version);
1600 1599
1601 int install_msg_base = IDS_INSTALL_FAILED_BASE; 1600 int install_msg_base = IDS_INSTALL_FAILED_BASE;
1602 string16 chrome_exe; 1601 base::string16 chrome_exe;
1603 string16 quoted_chrome_exe; 1602 base::string16 quoted_chrome_exe;
1604 if (install_status == SAME_VERSION_REPAIR_FAILED) { 1603 if (install_status == SAME_VERSION_REPAIR_FAILED) {
1605 if (installer_state.FindProduct(BrowserDistribution::CHROME_FRAME)) { 1604 if (installer_state.FindProduct(BrowserDistribution::CHROME_FRAME)) {
1606 install_msg_base = IDS_SAME_VERSION_REPAIR_FAILED_CF_BASE; 1605 install_msg_base = IDS_SAME_VERSION_REPAIR_FAILED_CF_BASE;
1607 } else { 1606 } else {
1608 install_msg_base = IDS_SAME_VERSION_REPAIR_FAILED_BASE; 1607 install_msg_base = IDS_SAME_VERSION_REPAIR_FAILED_BASE;
1609 } 1608 }
1610 } else if (install_status != INSTALL_FAILED) { 1609 } else if (install_status != INSTALL_FAILED) {
1611 if (installer_state.target_path().empty()) { 1610 if (installer_state.target_path().empty()) {
1612 // If we failed to construct install path, it means the OS call to 1611 // If we failed to construct install path, it means the OS call to
1613 // get %ProgramFiles% or %AppData% failed. Report this as failure. 1612 // get %ProgramFiles% or %AppData% failed. Report this as failure.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 prefs.GetBool(master_preferences::kDoNotLaunchChrome, 1651 prefs.GetBool(master_preferences::kDoNotLaunchChrome,
1653 &do_not_launch_chrome); 1652 &do_not_launch_chrome);
1654 if (!system_install && !do_not_launch_chrome) 1653 if (!system_install && !do_not_launch_chrome)
1655 chrome_install->LaunchChrome(installer_state.target_path()); 1654 chrome_install->LaunchChrome(installer_state.target_path());
1656 } 1655 }
1657 } else if ((install_status == NEW_VERSION_UPDATED) || 1656 } else if ((install_status == NEW_VERSION_UPDATED) ||
1658 (install_status == IN_USE_UPDATED)) { 1657 (install_status == IN_USE_UPDATED)) {
1659 const Product* chrome = installer_state.FindProduct( 1658 const Product* chrome = installer_state.FindProduct(
1660 BrowserDistribution::CHROME_BROWSER); 1659 BrowserDistribution::CHROME_BROWSER);
1661 if (chrome != NULL) { 1660 if (chrome != NULL) {
1662 DCHECK_NE(chrome_exe, string16()); 1661 DCHECK_NE(chrome_exe, base::string16());
1663 RemoveChromeLegacyRegistryKeys(chrome->distribution(), chrome_exe); 1662 RemoveChromeLegacyRegistryKeys(chrome->distribution(), chrome_exe);
1664 } 1663 }
1665 } 1664 }
1666 1665
1667 if (prefs.install_chrome_app_launcher() && 1666 if (prefs.install_chrome_app_launcher() &&
1668 InstallUtil::GetInstallReturnCode(install_status) == 0) { 1667 InstallUtil::GetInstallReturnCode(install_status) == 0) {
1669 std::string webstore_item(google_update::GetUntrustedDataValue( 1668 std::string webstore_item(google_update::GetUntrustedDataValue(
1670 kInstallFromWebstore)); 1669 kInstallFromWebstore));
1671 if (!webstore_item.empty()) { 1670 if (!webstore_item.empty()) {
1672 bool success = InstallFromWebstore(webstore_item); 1671 bool success = InstallFromWebstore(webstore_item);
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 // Call the newly updated setup.exe with kUncompressedArchive and 1884 // Call the newly updated setup.exe with kUncompressedArchive and
1886 // kMigrateChromeFrame to perform the migration. 1885 // kMigrateChromeFrame to perform the migration.
1887 LaunchChromeFrameMigrationProcess(*chrome_frame_state, cmd_line, 1886 LaunchChromeFrameMigrationProcess(*chrome_frame_state, cmd_line,
1888 installer_directory, system_install); 1887 installer_directory, system_install);
1889 } 1888 }
1890 1889
1891 VLOG(1) << "Installation complete, returning: " << return_code; 1890 VLOG(1) << "Installation complete, returning: " << return_code;
1892 1891
1893 return return_code; 1892 return return_code;
1894 } 1893 }
OLDNEW
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | chrome/installer/setup/uninstall.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698