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

Unified Diff: chrome/installer/setup/chrome_frame_quick_enable.cc

Issue 6538025: Temp dir cleanup:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/setup/chrome_frame_quick_enable.cc
===================================================================
--- chrome/installer/setup/chrome_frame_quick_enable.cc (revision 75264)
+++ chrome/installer/setup/chrome_frame_quick_enable.cc (working copy)
@@ -7,6 +7,7 @@
#include <windows.h>
#include "base/logging.h"
+#include "base/scoped_temp_dir.h"
#include "base/string_util.h"
#include "base/win/registry.h"
#include "chrome/installer/setup/install_worker.h"
@@ -79,6 +80,11 @@
LOG(ERROR) << "AddProduct failed";
status = INSTALL_FAILED;
} else {
+ ScopedTempDir temp_path;
+ if (!temp_path.CreateUniqueTempDir()) {
+ PLOG(ERROR) << "Failed to create Temp directory";
+ return INSTALL_FAILED;
+ }
scoped_ptr<WorkItemList> item_list(WorkItem::CreateWorkItemList());
const ProductState* chrome_state =
machine_state.GetProductState(installer_state->system_install(),
@@ -106,7 +112,7 @@
const Version* opv = chrome_state->old_version();
AppendPostInstallTasks(*installer_state, setup_path, new_chrome_exe, opv,
- new_version, item_list.get());
+ new_version, temp_path.path(), item_list.get());
// Before updating the channel values, add Chrome back to the mix so that
// all multi-installed products' channel values get updated.

Powered by Google App Engine
This is Rietveld 408576698