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

Unified Diff: chrome/browser/safe_browsing/ping_manager.h

Issue 2624193004: Submit a sample of notification images to Safe Browsing (Closed)
Patch Set: Add basic success test Created 3 years, 11 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/ping_manager.h
diff --git a/chrome/browser/safe_browsing/ping_manager.h b/chrome/browser/safe_browsing/ping_manager.h
index 9f0c1977ce8617790536e7b4ad1326e04f01ae35..7c54e840395e37bba2412fe4a7cc02e5277dc5f2 100644
--- a/chrome/browser/safe_browsing/ping_manager.h
+++ b/chrome/browser/safe_browsing/ping_manager.h
@@ -23,12 +23,15 @@
#include "net/url_request/url_fetcher_delegate.h"
#include "url/gurl.h"
+class SkBitmap;
+
namespace net {
class URLRequestContextGetter;
} // namespace net
namespace safe_browsing {
+class NotificationImageReporter;
class PermissionReporter;
class SafeBrowsingPingManager : public net::URLFetcherDelegate {
@@ -55,6 +58,11 @@ class SafeBrowsingPingManager : public net::URLFetcherDelegate {
// Report permission action to SafeBrowsing servers.
void ReportPermissionAction(const PermissionReportInfo& report_info);
+ // Report notification content image to SafeBrowsing CSD server if necessary.
+ void ReportNotificationImage(Profile* profile,
+ const GURL& origin,
+ const SkBitmap& image);
+
private:
friend class PermissionReporterBrowserTest;
friend class SafeBrowsingPingManagerTest;
@@ -102,6 +110,9 @@ class SafeBrowsingPingManager : public net::URLFetcherDelegate {
// Sends reports of permission actions.
std::unique_ptr<PermissionReporter> permission_reporter_;
+ // Sends reports of notification content images.
+ scoped_refptr<NotificationImageReporter> notification_image_reporter_;
+
net::NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager);

Powered by Google App Engine
This is Rietveld 408576698