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

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

Issue 6677141: Switch out use of std::string and std::vector for large allocations for a buffer class that doesn... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix linux build error. remove unnecessary call Created 9 years, 8 months 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 | « no previous file | chrome/installer/setup/setup_util.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 10 #include <string>
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 InstallUtil::WriteInstallerResult(system_install, 503 InstallUtil::WriteInstallerResult(system_install,
504 installer_state.state_key(), installer::TEMP_DIR_FAILED, 504 installer_state.state_key(), installer::TEMP_DIR_FAILED,
505 IDS_INSTALL_TEMP_DIR_FAILED_BASE, NULL); 505 IDS_INSTALL_TEMP_DIR_FAILED_BASE, NULL);
506 return installer::TEMP_DIR_FAILED; 506 return installer::TEMP_DIR_FAILED;
507 } 507 }
508 VLOG(1) << "created path " << temp_path.path().value(); 508 VLOG(1) << "created path " << temp_path.path().value();
509 509
510 FilePath unpack_path(temp_path.path().Append(installer::kInstallSourceDir)); 510 FilePath unpack_path(temp_path.path().Append(installer::kInstallSourceDir));
511 if (UnPackArchive(archive, installer_state, temp_path.path(), unpack_path, 511 if (UnPackArchive(archive, installer_state, temp_path.path(), unpack_path,
512 archive_type)) { 512 archive_type)) {
513 install_status = installer::UNCOMPRESSION_FAILED; 513 install_status = (*archive_type) == installer::INCREMENTAL_ARCHIVE_TYPE ?
514 installer::APPLY_DIFF_PATCH_FAILED : installer::UNCOMPRESSION_FAILED;
514 InstallUtil::WriteInstallerResult(system_install, 515 InstallUtil::WriteInstallerResult(system_install,
515 installer_state.state_key(), install_status, 516 installer_state.state_key(), install_status,
516 IDS_INSTALL_UNCOMPRESSION_FAILED_BASE, NULL); 517 IDS_INSTALL_UNCOMPRESSION_FAILED_BASE, NULL);
517 } else { 518 } else {
518 VLOG(1) << "unpacked to " << unpack_path.value(); 519 VLOG(1) << "unpacked to " << unpack_path.value();
519 FilePath src_path(unpack_path.Append(installer::kInstallSourceChromeDir)); 520 FilePath src_path(unpack_path.Append(installer::kInstallSourceChromeDir));
520 scoped_ptr<Version> 521 scoped_ptr<Version>
521 installer_version(installer::GetMaxVersionFromArchiveDir(src_path)); 522 installer_version(installer::GetMaxVersionFromArchiveDir(src_path));
522 if (!installer_version.get()) { 523 if (!installer_version.get()) {
523 LOG(ERROR) << "Did not find any valid version in installer."; 524 LOG(ERROR) << "Did not find any valid version in installer.";
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 if (!(installer_state.is_msi() && is_uninstall)) 1208 if (!(installer_state.is_msi() && is_uninstall))
1208 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT 1209 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT
1209 // to pass through, since this is only returned on uninstall which is 1210 // to pass through, since this is only returned on uninstall which is
1210 // never invoked directly by Google Update. 1211 // never invoked directly by Google Update.
1211 return_code = InstallUtil::GetInstallReturnCode(install_status); 1212 return_code = InstallUtil::GetInstallReturnCode(install_status);
1212 1213
1213 VLOG(1) << "Installation complete, returning: " << return_code; 1214 VLOG(1) << "Installation complete, returning: " << return_code;
1214 1215
1215 return return_code; 1216 return return_code;
1216 } 1217 }
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/setup/setup_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698