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

Unified Diff: chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.h

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
Index: chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.h
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.h b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.h
index 3cc91aaa390a20549a0d664664c9499cb5fd4fbb..1e43cc78bceeb52d14febee1b0636cc7f5a4ae5c 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.h
+++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.h
@@ -6,15 +6,30 @@
#define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_FETCHER_WIN_H_
#include "base/callback.h"
-#include "base/files/file_path.h"
+
+namespace base {
+class FilePath;
+}
namespace safe_browsing {
+enum class ChromeCleanerFetchStatus {
+ // Fetch succeeded with a net::HTTP_OK response code.
+ kSuccess,
+ // File system error, no fetch on the network was attempted.
+ kFailedToCreateTemporaryDirectory,
+ // We received a net::HTTP_NOT_FOUND response code.
+ kNotFoundOnServer,
+ // Fetch failed or we received an http response code other than net::HTTP_OK
+ // and net::HTTP_NOT_FOUND.
+ kOtherFailure,
+};
+
// Type of callback that is called when the network request to fetch the Chrome
-// Cleaner binary has been completed. The callback will be passed the filepath
-// and http response code as returned by net::URLFetcher.
+// Cleaner binary has been completed.
using ChromeCleanerFetchedCallback =
- base::OnceCallback<void(base::FilePath, int /*http response code*/)>;
+ base::OnceCallback<void(base::FilePath,
+ ChromeCleanerFetchStatus fetch_status)>;
// Fetches the Chrome Cleaner binary. This function can be called from any
// sequence and |fetched_callback| will be called back on that same sequence.

Powered by Google App Engine
This is Rietveld 408576698