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

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

Issue 2624193004: Submit a sample of notification images to Safe Browsing (Closed)
Patch Set: Report net_error codes to UMA 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..8f5e1dde2f59ca06fb3d6acb94ffb849b93716a5 100644
--- a/chrome/browser/safe_browsing/ping_manager.h
+++ b/chrome/browser/safe_browsing/ping_manager.h
@@ -23,13 +23,18 @@
#include "net/url_request/url_fetcher_delegate.h"
#include "url/gurl.h"
+class Profile;
+class SkBitmap;
+
namespace net {
class URLRequestContextGetter;
} // namespace net
namespace safe_browsing {
+class NotificationImageReporter;
class PermissionReporter;
+class SafeBrowsingDatabaseManager;
class SafeBrowsingPingManager : public net::URLFetcherDelegate {
public:
@@ -55,7 +60,15 @@ 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 scoped_refptr<SafeBrowsingDatabaseManager>& database_manager,
+ const GURL& origin,
+ const SkBitmap& image);
+
private:
+ friend class NotificationImageReporterTest;
friend class PermissionReporterBrowserTest;
friend class SafeBrowsingPingManagerTest;
FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest,
@@ -102,6 +115,9 @@ class SafeBrowsingPingManager : public net::URLFetcherDelegate {
// Sends reports of permission actions.
std::unique_ptr<PermissionReporter> permission_reporter_;
+ // Sends reports of notification content images.
+ std::unique_ptr<NotificationImageReporter> notification_image_reporter_;
+
net::NetLogWithSource net_log_;
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager);
« no previous file with comments | « chrome/browser/safe_browsing/notification_image_reporter_unittest.cc ('k') | chrome/browser/safe_browsing/ping_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698