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

Unified Diff: chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_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 | « chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.cc
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.cc
index 7895e9e1f29b2ae2f3588b720323c316b12ee684..3b267840eb1ce7f7bdffb4af663c378d7ec70cf2 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.cc
+++ b/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.cc
@@ -483,7 +483,8 @@ void RecordReporterStepHistogram(SwReporterUmaValue value) {
uma.RecordReporterStep(value);
}
-void DisplaySRTPrompt(base::FilePath download_path, int http_response_code) {
+void DisplaySRTPrompt(base::FilePath download_path,
+ ChromeCleanerFetchStatus fetch_status) {
// As long as the fetch didn't fail due to HTTP_NOT_FOUND, show a prompt
// (either offering the tool directly or pointing to the download page).
// If the fetch failed to find the file, don't prompt the user since the
@@ -491,7 +492,7 @@ void DisplaySRTPrompt(base::FilePath download_path, int http_response_code) {
// TODO(csharp): In the event the browser is closed before the prompt
// displays, we will wait until the next scanner run to
// re-display it. Improve this. http://crbug.com/460295
- if (http_response_code == net::HTTP_NOT_FOUND) {
+ if (fetch_status == ChromeCleanerFetchStatus::kNotFoundOnServer) {
RecordSRTPromptHistogram(SRT_PROMPT_DOWNLOAD_UNAVAILABLE);
return;
}
@@ -571,7 +572,7 @@ int LaunchAndWaitForExitOnBackgroundThread(
} // namespace
void DisplaySRTPromptForTesting(const base::FilePath& download_path) {
- DisplaySRTPrompt(download_path, net::HTTP_OK);
+ DisplaySRTPrompt(download_path, ChromeCleanerFetchStatus::kSuccess);
}
namespace {
« no previous file with comments | « chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698