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

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

Created:
3 years, 11 months ago by harkness
Modified:
3 years, 11 months ago
CC:
chromium-reviews, Peter Beverloo, grt+watch_chromium.org, mlamouri+watch-notifications_chromium.org, awdf+watch_chromium.org, asvitkine+watch_chromium.org, Jialiu Lin
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). - Device is part of the enabled experiment group. 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 Review-Url: https://codereview.chromium.org/2637153002 Cr-Commit-Position: refs/heads/master@{#445365} Committed: https://chromium.googlesource.com/chromium/src/+/f4f2180f841790ca788134df1cc8bf75b1d6ac58

Patch Set 1 #

Total comments: 7

Patch Set 2 : Updated resizing code and added mime_type to the proto. #

Patch Set 3 : Updated/confirmed URL for reporting #

Total comments: 15

Patch Set 4 : Refactored scout check #

Total comments: 14

Patch Set 5 : Changed the Finch to be a params based trial. Also addressed nits. #

Total comments: 12

Patch Set 6 : updated test to check for not logging when report chance is 0. #

Total comments: 4

Patch Set 7 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+716 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 4 chunks +22 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/notification_image_reporter.h View 1 2 3 4 5 6 1 chunk +109 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/notification_image_reporter.cc View 1 2 3 4 1 chunk +225 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/notification_image_reporter_unittest.cc View 1 2 3 4 5 6 1 chunk +285 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/ping_manager.h View 3 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/ping_manager.cc View 4 chunks +15 lines, -2 lines 0 comments Download
M chrome/common/safe_browsing/csd.proto View 1 2 3 4 1 chunk +30 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (11 generated)
harkness
nparker@chromium.org: Please review changes in chrome/*/safe_browsing/ peter@chromium.org: Please review changes in chrome/browser/notifications/ This is an ...
3 years, 11 months ago (2017-01-17 17:05:03 UTC) #2
Nathan Parker
I didn't get a chance to do a full pass at the threading changes from ...
3 years, 11 months ago (2017-01-19 01:22:09 UTC) #3
johnme
Thanks! https://codereview.chromium.org/2637153002/diff/1/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2637153002/diff/1/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode69 chrome/browser/safe_browsing/notification_image_reporter.cc:69: trial->AppendGroup("enabled", 20); The plan is to land this ...
3 years, 11 months ago (2017-01-19 08:58:53 UTC) #4
harkness
Updated as per John and Nathan's comments. https://codereview.chromium.org/2637153002/diff/1/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2637153002/diff/1/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode69 chrome/browser/safe_browsing/notification_image_reporter.cc:69: trial->AppendGroup("enabled", 20); ...
3 years, 11 months ago (2017-01-19 16:20:55 UTC) #5
harkness
isherman@ could you please take a look at UMA changes?
3 years, 11 months ago (2017-01-19 16:22:06 UTC) #7
Jialiu Lin
https://codereview.chromium.org/2637153002/diff/40001/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2637153002/diff/40001/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode95 chrome/browser/safe_browsing/notification_image_reporter.cc:95: if (!IsReportingEnabled()) { Finch checking does not need to ...
3 years, 11 months ago (2017-01-19 18:54:47 UTC) #9
harkness
https://codereview.chromium.org/2637153002/diff/40001/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2637153002/diff/40001/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode95 chrome/browser/safe_browsing/notification_image_reporter.cc:95: if (!IsReportingEnabled()) { On 2017/01/19 18:54:47, Jialiu Lin wrote: ...
3 years, 11 months ago (2017-01-19 20:09:09 UTC) #10
Ilya Sherman
Metrics LGTM https://codereview.chromium.org/2637153002/diff/60001/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2637153002/diff/60001/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode43 chrome/browser/safe_browsing/notification_image_reporter.cc:43: void LogReportResult(const GURL& url, int net_error) { ...
3 years, 11 months ago (2017-01-19 22:53:40 UTC) #11
Jialiu Lin
lgtm, Thanks for all the explanations. https://codereview.chromium.org/2637153002/diff/40001/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2637153002/diff/40001/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode95 chrome/browser/safe_browsing/notification_image_reporter.cc:95: if (!IsReportingEnabled()) { ...
3 years, 11 months ago (2017-01-19 23:10:40 UTC) #12
Peter Beverloo
Thanks for picking this up Jen! Notifications lgtm
3 years, 11 months ago (2017-01-19 23:22:13 UTC) #13
Nathan Parker
https://codereview.chromium.org/2637153002/diff/60001/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2637153002/diff/60001/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode40 chrome/browser/safe_browsing/notification_image_reporter.cc:40: const char kImageReporting[] = "NotificationImageReporting"; nit: Add "FieldTrial" (or ...
3 years, 11 months ago (2017-01-20 00:25:43 UTC) #16
Nathan Parker
https://codereview.chromium.org/2637153002/diff/60001/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2637153002/diff/60001/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode123 chrome/browser/safe_browsing/notification_image_reporter.cc:123: return (base::FieldTrialList::FindFullName(kImageReporting) == "enabled"); On 2017/01/20 00:25:43, Nathan Parker ...
3 years, 11 months ago (2017-01-20 01:37:29 UTC) #19
harkness
https://codereview.chromium.org/2637153002/diff/60001/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2637153002/diff/60001/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode40 chrome/browser/safe_browsing/notification_image_reporter.cc:40: const char kImageReporting[] = "NotificationImageReporting"; On 2017/01/20 00:25:43, Nathan ...
3 years, 11 months ago (2017-01-20 16:58:06 UTC) #20
Nathan Parker
LGTM! Just one test request. Thanks https://codereview.chromium.org/2637153002/diff/80001/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2637153002/diff/80001/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode123 chrome/browser/safe_browsing/notification_image_reporter.cc:123: double report_chance = ...
3 years, 11 months ago (2017-01-20 21:18:49 UTC) #21
harkness
https://codereview.chromium.org/2637153002/diff/80001/chrome/browser/safe_browsing/notification_image_reporter.cc File chrome/browser/safe_browsing/notification_image_reporter.cc (right): https://codereview.chromium.org/2637153002/diff/80001/chrome/browser/safe_browsing/notification_image_reporter.cc#newcode123 chrome/browser/safe_browsing/notification_image_reporter.cc:123: double report_chance = variations::GetVariationParamByFeatureAsDouble( On 2017/01/20 21:18:49, Nathan Parker ...
3 years, 11 months ago (2017-01-23 11:30:10 UTC) #22
johnme
lgtm - thanks a lot for taking this patch over! https://codereview.chromium.org/2637153002/diff/80001/chrome/browser/safe_browsing/notification_image_reporter.h File chrome/browser/safe_browsing/notification_image_reporter.h (right): https://codereview.chromium.org/2637153002/diff/80001/chrome/browser/safe_browsing/notification_image_reporter.h#newcode70 ...
3 years, 11 months ago (2017-01-23 11:34:34 UTC) #23
harkness
https://codereview.chromium.org/2637153002/diff/80001/chrome/browser/safe_browsing/notification_image_reporter.h File chrome/browser/safe_browsing/notification_image_reporter.h (right): https://codereview.chromium.org/2637153002/diff/80001/chrome/browser/safe_browsing/notification_image_reporter.h#newcode70 chrome/browser/safe_browsing/notification_image_reporter.h:70: // callable from any thread and will invoke a ...
3 years, 11 months ago (2017-01-23 11:45:56 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2637153002/120001
3 years, 11 months ago (2017-01-23 11:46:22 UTC) #27
commit-bot: I haz the power
3 years, 11 months ago (2017-01-23 12:38:34 UTC) #30
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/f4f2180f841790ca788134df1cc8...

Powered by Google App Engine
This is Rietveld 408576698