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

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

Issue 8724014: Only enable improved SafeBrowsing download protection on Windows. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix typo Created 9 years, 1 month 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 7fe07580457dd4280c89dac7c48f23e5d9f89f45..b867e88a4f6a526348c71fb7e2025f85eb7ef951 100644
--- a/chrome/browser/safe_browsing/download_protection_service.cc
+++ b/chrome/browser/safe_browsing/download_protection_service.cc
@@ -527,12 +527,20 @@ class DownloadProtectionService::CheckClientDownloadRequest
RecordImprovedProtectionStats(REASON_PING_DISABLED);
CheckDigestList();
} else {
+ // Currently, the UI only works on Windows so we don't even bother
+ // with pinging the server if we're not on Windows. TODO(noelutz):
+ // change this code once the UI is done for Linux and Mac.
+#if defined(OS_WIN)
// The URLFetcher is owned by the UI thread, so post a message to
// start the pingback.
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
base::Bind(&CheckClientDownloadRequest::SendRequest, this));
+#else
+ RecordImprovedProtectionStats(REASON_OS_NOT_SUPPORTED);
+ CheckDigestList();
+#endif
}
}

Powered by Google App Engine
This is Rietveld 408576698