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

Unified Diff: chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.cc

Issue 2929483002: Chrome Cleaner: download the Chrome Cleaner executable in an empty directory. (Closed)
Patch Set: Nits Created 3 years, 6 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 | chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.cc
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.cc
index 7424302ac5fb187933b0806bf737636c3c166b5a..fcb7ab0169f0a20e5659adcc4792a4059660e7a0 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.cc
+++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.cc
@@ -43,14 +43,15 @@ constexpr int kRebootNotRequiredExitCode = 0;
// Attempts to change the Chrome Cleaner binary's suffix to ".exe". Will return
// an empty FilePath on failure. Should be called on a sequence with traits
// appropriate for IO operations.
-base::FilePath VerifyAndRenameDownloadedCleaner(base::FilePath downloaded_path,
- int http_response_code) {
+base::FilePath VerifyAndRenameDownloadedCleaner(
+ base::FilePath downloaded_path,
+ ChromeCleanerFetchStatus fetch_status) {
base::ThreadRestrictions::AssertIOAllowed();
if (downloaded_path.empty() || !base::PathExists(downloaded_path))
return base::FilePath();
- if (http_response_code != net::HTTP_OK) {
+ if (fetch_status != ChromeCleanerFetchStatus::kSuccess) {
base::DeleteFile(downloaded_path, /*recursive=*/false);
return base::FilePath();
}
@@ -69,13 +70,13 @@ base::FilePath VerifyAndRenameDownloadedCleaner(base::FilePath downloaded_path,
void OnChromeCleanerFetched(
ChromeCleanerControllerDelegate::FetchedCallback fetched_callback,
base::FilePath downloaded_path,
- int http_response_code) {
+ ChromeCleanerFetchStatus fetch_status) {
base::PostTaskWithTraitsAndReplyWithResult(
FROM_HERE,
{base::MayBlock(), base::TaskPriority::BACKGROUND,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
base::BindOnce(VerifyAndRenameDownloadedCleaner, downloaded_path,
- http_response_code),
+ fetch_status),
std::move(fetched_callback));
}
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698