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

Unified Diff: components/update_client/component.cc

Issue 2918653003: Unconditionally delete the unpack path in the UpdateClient. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | components/update_client/test_installer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/component.cc
diff --git a/components/update_client/component.cc b/components/update_client/component.cc
index dec191d487418503e62728a4f09d6bfe48004487..a63b5cdc6800fdaccc4d0ffb484efca9d5852a78 100644
--- a/components/update_client/component.cc
+++ b/components/update_client/component.cc
@@ -95,9 +95,11 @@ void InstallOnBlockingTaskRunner(
InstallOnBlockingTaskRunnerCompleteCallback callback) {
DCHECK(blocking_task_runner->RunsTasksOnCurrentThread());
+ DCHECK(base::DirectoryExists(unpack_path));
const auto result = DoInstallOnBlockingTaskRunner(
main_task_runner, blocking_task_runner, unpack_path, fingerprint,
installer, callback);
+ base::DeleteFile(unpack_path, true);
const ErrorCategory error_category =
result.error ? ErrorCategory::kInstallError : ErrorCategory::kErrorNone;
« no previous file with comments | « no previous file | components/update_client/test_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698