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

Unified Diff: chrome/installer/mini_installer/mini_installer.cc

Issue 6693015: Switch out the setup api for using the cabinet API directly.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/mini_installer/mini_installer.cc
===================================================================
--- chrome/installer/mini_installer/mini_installer.cc (revision 78428)
+++ chrome/installer/mini_installer/mini_installer.cc (working copy)
@@ -33,6 +33,7 @@
#include <shellapi.h>
#include "chrome/installer/mini_installer/appid.h"
+#include "chrome/installer/mini_installer/decompress.h"
#include "chrome/installer/mini_installer/mini_installer.h"
#include "chrome/installer/mini_installer/mini_string.h"
#include "chrome/installer/mini_installer/pe_resource.h"
@@ -427,20 +428,18 @@
if (setup_path->length() > 0) {
// Uncompress LZ compressed resource. Setup is packed with 'MSCF'
- // as opposed to old DOS way of 'SZDD'. Hence use SetupInstallFile
- // instead of LZCopy.
- // Note that the API will automatically delete the original file
- // if the extraction was successful.
- // TODO(tommi): Use the cabinet API directly.
- if (!SetupInstallFile(NULL, NULL, setup_path->get(), NULL,
- setup_dest_path.get(),
- SP_COPY_DELETESOURCE | SP_COPY_SOURCE_ABSOLUTE,
- NULL, NULL)) {
- DeleteFile(setup_path->get());
- return false;
+ // as opposed to old DOS way of 'SZDD'. Hence we don't use LZCopy.
+ bool success = mini_installer::Expand(setup_path->get(),
+ setup_dest_path.get());
+ ::DeleteFile(setup_path->get());
+ if (success) {
+ if (!setup_path->assign(setup_dest_path.get())) {
+ ::DeleteFile(setup_dest_path.get());
+ success = false;
+ }
}
- return setup_path->assign(setup_dest_path.get());
+ return success;
}
// setup.exe still not found. So finally check if it was sent as 'BN'

Powered by Google App Engine
This is Rietveld 408576698