diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 15:20:49 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 15:20:49 +0000 |
commit | 86550a48fb1d29a4aef57ded243d335a9b1408cf (patch) | |
tree | d24c3495b39389f33000b4f535a0bf246277f2d0 /chrome/installer/setup/setup_util.cc | |
parent | ac38a4e4cd797177454038396842fa35e2d949e3 (diff) | |
download | chromium_src-86550a48fb1d29a4aef57ded243d335a9b1408cf.zip chromium_src-86550a48fb1d29a4aef57ded243d335a9b1408cf.tar.gz chromium_src-86550a48fb1d29a4aef57ded243d335a9b1408cf.tar.bz2 |
Revert 207805 "Differential updates for components. We are addin..."
Unit tests fail on Mac Dbg with this patch:
http://build.chromium.org/p/chromium.mac/buildstatus?builder=Mac%2010.6%20Tests%20%28dbg%29%284%29&number=29470
and
http://build.chromium.org/p/chromium.mac/buildstatus?builder=Mac%2010.7%20Tests%20%28dbg%29%284%29&number=12750
> Differential updates for components. We are adding support for delivering delta updates for Chrome components. Initial platform support for the patcher is Windows only. The update response includes both the full update and, if available, the differential update. The differential update is tried first, then the full update, if needed.
>
> BUG=245318
>
> Review URL: https://chromiumcodereview.appspot.com/15908002
TBR=sorin@chromium.org
Review URL: https://codereview.chromium.org/17551004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207823 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup/setup_util.cc')
-rw-r--r-- | chrome/installer/setup/setup_util.cc | 70 |
1 files changed, 6 insertions, 64 deletions
diff --git a/chrome/installer/setup/setup_util.cc b/chrome/installer/setup/setup_util.cc index d679274..ef0f8360 100644 --- a/chrome/installer/setup/setup_util.cc +++ b/chrome/installer/setup/setup_util.cc @@ -24,7 +24,6 @@ #include "chrome/installer/util/util_constants.h" #include "chrome/installer/util/work_item.h" #include "courgette/courgette.h" -#include "courgette/third_party/bsdiff.h" #include "third_party/bspatch/mbspatch.h" namespace installer { @@ -87,59 +86,12 @@ bool SupportsSingleInstall(BrowserDistribution::Type type) { } // namespace -int CourgettePatchFiles(const base::FilePath& src, - const base::FilePath& patch, - const base::FilePath& dest) { - VLOG(1) << "Applying Courgette patch " << patch.value() - << " to file " << src.value() - << " and generating file " << dest.value(); - - if (src.empty() || patch.empty() || dest.empty()) - return installer::PATCH_INVALID_ARGUMENTS; - - const courgette::Status patch_status = - courgette::ApplyEnsemblePatch(src.value().c_str(), - patch.value().c_str(), - dest.value().c_str()); - const int exit_code = (patch_status != courgette::C_OK) ? - static_cast<int>(patch_status) + kCourgetteErrorOffset : 0; - - LOG_IF(ERROR, exit_code) - << "Failed to apply Courgette patch " << patch.value() - << " to file " << src.value() << " and generating file " << dest.value() - << ". err=" << exit_code; - - return exit_code; -} - -int BsdiffPatchFiles(const base::FilePath& src, - const base::FilePath& patch, - const base::FilePath& dest) { - VLOG(1) << "Applying bsdiff patch " << patch.value() - << " to file " << src.value() - << " and generating file " << dest.value(); - - if (src.empty() || patch.empty() || dest.empty()) - return installer::PATCH_INVALID_ARGUMENTS; - - const int patch_status = courgette::ApplyBinaryPatch(src, patch, dest); - const int exit_code = patch_status != OK ? - patch_status + kBsdiffErrorOffset : 0; - - LOG_IF(ERROR, exit_code) - << "Failed to apply bsdiff patch " << patch.value() - << " to file " << src.value() << " and generating file " << dest.value() - << ". err=" << exit_code; - - return exit_code; -} - int ApplyDiffPatch(const base::FilePath& src, const base::FilePath& patch, const base::FilePath& dest, const InstallerState* installer_state) { - VLOG(1) << "Applying patch " << patch.value() << " to file " - << src.value() << " and generating file " << dest.value(); + VLOG(1) << "Applying patch " << patch.value() << " to file " << src.value() + << " and generating file " << dest.value(); if (installer_state != NULL) installer_state->UpdateStage(installer::ENSEMBLE_PATCHING); @@ -153,10 +105,8 @@ int ApplyDiffPatch(const base::FilePath& src, if (patch_status == courgette::C_OK) return 0; - LOG(ERROR) - << "Failed to apply patch " << patch.value() - << " to file " << src.value() << " and generating file " << dest.value() - << " using courgette. err=" << patch_status; + VLOG(1) << "Failed to apply patch " << patch.value() + << " using courgette. err=" << patch_status; // If we ran out of memory or disk space, then these are likely the errors // we will see. If we run into them, return an error and stay on the @@ -169,16 +119,8 @@ int ApplyDiffPatch(const base::FilePath& src, if (installer_state != NULL) installer_state->UpdateStage(installer::BINARY_PATCHING); - int binary_patch_status = ApplyBinaryPatch(src.value().c_str(), - patch.value().c_str(), - dest.value().c_str()); - - LOG_IF(ERROR, binary_patch_status != OK) - << "Failed to apply patch " << patch.value() - << " to file " << src.value() << " and generating file " << dest.value() - << " using bsdiff. err=" << binary_patch_status; - - return binary_patch_status; + return ApplyBinaryPatch(src.value().c_str(), patch.value().c_str(), + dest.value().c_str()); } Version* GetMaxVersionFromArchiveDir(const base::FilePath& chrome_path) { |