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

Unified Diff: chrome/browser/safe_browsing/download_protection_service.cc

Issue 1348683003: enable download protection on CrOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 2 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/download_protection_service.cc
diff --git a/chrome/browser/safe_browsing/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection_service.cc
index 228894f1785522a51647509a7f1c9b1c566d3f47..18e6b4f1c208a68b853ced3ea4174ab1b268258a 100644
--- a/chrome/browser/safe_browsing/download_protection_service.cc
+++ b/chrome/browser/safe_browsing/download_protection_service.cc
@@ -669,10 +669,10 @@ class DownloadProtectionService::CheckClientDownloadRequest
return;
}
- // Currently, the UI is only enabled on Windows and OSX so we don't even
- // bother with pinging the server if we're not on one of those platforms.
- // TODO(noelutz): change this code once the UI is done for Linux.
-#if defined(OS_WIN) || defined(OS_MACOSX)
+// Currently, the UI is enabled on Windows, OSX and chrome OS. we don't ping
+// the server if we're not on one of those platforms.
+// TODO(noelutz): change this code once the UI is done for Linux.
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
// The URLFetcher is owned by the UI thread, so post a message to
// start the pingback.
BrowserThread::PostTask(
@@ -1017,10 +1017,10 @@ void DownloadProtectionService::CheckDownloadUrl(
bool DownloadProtectionService::IsSupportedDownload(
const content::DownloadItem& item,
const base::FilePath& target_path) const {
- // Currently, the UI is only enabled on Windows and OSX. On Linux we still
- // want to show the dangerous file type warning if the file is possibly
- // dangerous which means we have to always return false here.
-#if defined(OS_WIN) || defined(OS_MACOSX)
+// Currently, the UI is only enabled on Windows, OSX and Chrome OS. On
+// Linux we still want to show the dangerous file type warning if the file
+// is possibly dangerous which means we have to always return false here.
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
DownloadCheckResultReason reason = REASON_MAX;
ClientDownloadRequest::DownloadType type =
ClientDownloadRequest::WIN_EXECUTABLE;

Powered by Google App Engine
This is Rietveld 408576698