Chromium Code Reviews
Help | Chromium Project | Sign in
(21)

Issue 2624193004: Submit a sample of notification images to Safe Browsing (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 months, 2 weeks ago by johnme
Modified:
2 months, 3 weeks ago
CC:
chromium-reviews, Peter Beverloo, grt+watch_chromium.org, mlamouri+watch-notifications_chromium.org, awdf+watch_chromium.org, harkness
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Submit a sample of notification images to Safe Browsing These will be scanned for social engineering behavior. Only uploads if all of the following are true: - User has opted in to SBER_LEVEL_SCOUT. - Origin is not on CSD phishing whitelist. - Device has sent < 5 reports in last 24 hours (see persistence TODO). - Do a dice roll, and keep only 20% of notifications (see Finch TODO). The notification image bitmap is downscaled to <= 512x512, encoded as a PNG, then sent to the CSD server as a NotificationImageReportRequest protobuf from chrome/common/safe_browsing/csd.proto. BUG=678443

Patch Set 1 #

Total comments: 31

Patch Set 2 : Address peter's review comments #

Total comments: 8

Patch Set 3 : Add basic success test #

Total comments: 6

Patch Set 4 : Address most review comments #

Patch Set 5 : Address Peter's nits #

Patch Set 6 : Added tests for SBER level and image downscaling #

Patch Set 7 : Add partial test for MaxReportsPerDay #

Patch Set 8 : Fix MaxReportsPerDay test #

Patch Set 9 : Report net_error codes to UMA #

Unified diffs Side-by-side diffs Delta from patch set Stats (+672 lines, -3 lines) Patch
M chrome/browser/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.cc View 1 2 3 4 chunks +22 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/notification_image_reporter.h View 1 2 3 4 5 1 chunk +105 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/notification_image_reporter.cc View 1 2 3 4 5 6 7 8 1 chunk +207 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/notification_image_reporter_unittest.cc View 1 2 3 4 5 6 7 1 chunk +268 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/ping_manager.h View 1 2 3 3 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/ping_manager.cc View 1 2 3 4 chunks +15 lines, -2 lines 0 comments Download
M chrome/common/safe_browsing/csd.proto View 1 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
Trybot results:
Commit queue not available (can’t edit this change).

Messages

Total messages: 17 (6 generated)
johnme
nparker@chromium.org: Please review changes in chrome/*/safe_browsing/ peter@chromium.org: Please review changes in chrome/browser/notifications/
3 months, 2 weeks ago (2017-01-11 17:44:01 UTC) #2
johnme
Left comments on two parts I was unsure about. https://codereview.chromium.org/2624193004/diff/1/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2624193004/diff/1/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode76 chrome/browser/safe_browsing/notification_image_reporter.cc:76: ...
3 months, 2 weeks ago (2017-01-11 17:50:53 UTC) #3
Peter Beverloo
https://codereview.chromium.org/2624193004/diff/1/chrome/browser/notifications/platform_notification_service_impl.cc File chrome/browser/notifications/platform_notification_service_impl.cc (right): https://codereview.chromium.org/2624193004/diff/1/chrome/browser/notifications/platform_notification_service_impl.cc#newcode102 chrome/browser/notifications/platform_notification_service_impl.cc:102: ping_manager->ReportNotificationImage(profile, origin, image); nit: since initializing and shutting down ...
3 months, 2 weeks ago (2017-01-11 18:23:57 UTC) #4
johnme
Addressed peter's review comments. https://codereview.chromium.org/2624193004/diff/1/chrome/browser/notifications/platform_notification_service_impl.cc File chrome/browser/notifications/platform_notification_service_impl.cc (right): https://codereview.chromium.org/2624193004/diff/1/chrome/browser/notifications/platform_notification_service_impl.cc#newcode102 chrome/browser/notifications/platform_notification_service_impl.cc:102: ping_manager->ReportNotificationImage(profile, origin, image); On 2017/01/11 ...
3 months, 2 weeks ago (2017-01-11 20:05:08 UTC) #5
Nathan Parker (ooo till May 1)
Overall I think it looks like a great approach. How about some tests? https://codereview.chromium.org/2624193004/diff/1/chrome/browser/safe_browsing/notification_image_reporter.cc File ...
3 months, 2 weeks ago (2017-01-11 22:34:38 UTC) #6
Nathan Parker (ooo till May 1)
Ah, I just noticed your comment about dereferencing weakPtr's on different threads. Hrm. We need ...
3 months, 2 weeks ago (2017-01-11 22:46:10 UTC) #7
Peter Beverloo
//c/b/notifications lgtm https://codereview.chromium.org/2624193004/diff/40001/chrome/browser/safe_browsing/notification_image_reporter_unittest.cc File chrome/browser/safe_browsing/notification_image_reporter_unittest.cc (right): https://codereview.chromium.org/2624193004/diff/40001/chrome/browser/safe_browsing/notification_image_reporter_unittest.cc#newcode31 chrome/browser/safe_browsing/notification_image_reporter_unittest.cc:31: const char kReportingUploadUrl[] = nit: comment on ...
3 months, 2 weeks ago (2017-01-13 00:48:35 UTC) #12
johnme
Addressed Nathan's review comments, except for adding Finch param. Haven't yet looked at Peter's nits. ...
3 months, 2 weeks ago (2017-01-13 02:38:17 UTC) #13
johnme
Addressed Peter's nits - thanks https://codereview.chromium.org/2624193004/diff/40001/chrome/browser/safe_browsing/notification_image_reporter_unittest.cc File chrome/browser/safe_browsing/notification_image_reporter_unittest.cc (right): https://codereview.chromium.org/2624193004/diff/40001/chrome/browser/safe_browsing/notification_image_reporter_unittest.cc#newcode31 chrome/browser/safe_browsing/notification_image_reporter_unittest.cc:31: const char kReportingUploadUrl[] = ...
3 months, 1 week ago (2017-01-13 17:12:26 UTC) #14
Nathan Parker (ooo till May 1)
This CL is obsoleted by harkness's copy below, while johnme is ooo https://codereview.chromium.org/2637153002/
3 months, 1 week ago (2017-01-18 21:38:04 UTC) #15
johnme
2 months, 3 weeks ago (2017-01-31 16:27:21 UTC) #17
Message was sent while issue was closed.
Superceded by https://codereview.chromium.org/2637153002
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld cc6ac46