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

Issue 2361963002: Adding NetLog support to SafeBrowsingPingManager. (Closed)

Created:
4 years, 2 months ago by lpz
Modified:
4 years, 2 months ago
CC:
cbentzel+watch_chromium.org, chromium-reviews, eroman, grt+watch_chromium.org, mmenke, ramant (doing other things)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding NetLog support to SafeBrowsingPingManager. This includes defining a new NetLog event (SAFE_BROWSING_PING), which begins when a ping is queued up, and ends when the result callback is fired. Covers both the SafeBrowsingHit and ThreatDetails pings. BUG=648323 Committed: https://crrev.com/f69809c4d3c28423bf1c11fce30dfd0360fdd2df Cr-Commit-Position: refs/heads/master@{#422849}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Segfault fix: call netlog before std::moving the fetcher #

Total comments: 6

Patch Set 3 : Added unit tests. #

Patch Set 4 : Addressing review comments. #

Total comments: 2

Patch Set 5 : Base64 encoding the payloads. #

Total comments: 6

Patch Set 6 : Tidy up after final reviews. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+243 lines, -23 lines) Patch
M chrome/browser/safe_browsing/ping_manager.h View 1 2 3 4 5 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/ping_manager.cc View 1 2 3 4 5 7 chunks +60 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/ping_manager_unittest.cc View 1 2 3 4 5 9 chunks +160 lines, -21 lines 0 comments Download
M net/log/net_log_event_type_list.h View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (33 generated)
lpz
Early snapshot of a CL to add NetLog support for ThreatDetails. Just a quick pass ...
4 years, 2 months ago (2016-09-22 19:12:39 UTC) #2
Jialiu Lin
https://codereview.chromium.org/2361963002/diff/1/chrome/browser/safe_browsing/ping_manager.cc File chrome/browser/safe_browsing/ping_manager.cc (right): https://codereview.chromium.org/2361963002/diff/1/chrome/browser/safe_browsing/ping_manager.cc#newcode155 chrome/browser/safe_browsing/ping_manager.cc:155: hit_report.post_data)); It seems hit_report.post_data could be empty if report ...
4 years, 2 months ago (2016-09-22 21:19:14 UTC) #7
sadrul
With the standard caveat that I am not really familiar with this code: looks reasonable ...
4 years, 2 months ago (2016-09-23 16:38:21 UTC) #12
lpz
https://codereview.chromium.org/2361963002/diff/1/chrome/browser/safe_browsing/ping_manager.cc File chrome/browser/safe_browsing/ping_manager.cc (right): https://codereview.chromium.org/2361963002/diff/1/chrome/browser/safe_browsing/ping_manager.cc#newcode155 chrome/browser/safe_browsing/ping_manager.cc:155: hit_report.post_data)); On 2016/09/22 21:19:13, Jialiu Lin wrote: > It ...
4 years, 2 months ago (2016-09-23 18:11:58 UTC) #15
Jialiu Lin
https://codereview.chromium.org/2361963002/diff/1/chrome/browser/safe_browsing/ping_manager.cc File chrome/browser/safe_browsing/ping_manager.cc (right): https://codereview.chromium.org/2361963002/diff/1/chrome/browser/safe_browsing/ping_manager.cc#newcode155 chrome/browser/safe_browsing/ping_manager.cc:155: hit_report.post_data)); On 2016/09/23 at 18:11:58, lpz wrote: > On ...
4 years, 2 months ago (2016-09-23 18:18:26 UTC) #16
Nathan Parker
Looks great! LGTM https://codereview.chromium.org/2361963002/diff/60001/chrome/browser/safe_browsing/ping_manager.cc File chrome/browser/safe_browsing/ping_manager.cc (right): https://codereview.chromium.org/2361963002/diff/60001/chrome/browser/safe_browsing/ping_manager.cc#newcode152 chrome/browser/safe_browsing/ping_manager.cc:152: report_ptr->GetOriginalURL(), hit_report.post_data)); Is the post data ...
4 years, 2 months ago (2016-09-23 18:43:09 UTC) #17
lpz
Thanks for the feedback so far. Note that something about this change is broken (see ...
4 years, 2 months ago (2016-09-23 18:48:01 UTC) #18
lpz
rtenneti@chromium.org: Please review changes in net_log_event_type_list.h https://codereview.chromium.org/2361963002/diff/1/chrome/browser/safe_browsing/ping_manager.cc File chrome/browser/safe_browsing/ping_manager.cc (right): https://codereview.chromium.org/2361963002/diff/1/chrome/browser/safe_browsing/ping_manager.cc#newcode155 chrome/browser/safe_browsing/ping_manager.cc:155: hit_report.post_data)); On 2016/09/23 ...
4 years, 2 months ago (2016-09-26 19:55:39 UTC) #26
Jialiu Lin
lgtm https://codereview.chromium.org/2361963002/diff/1/chrome/browser/safe_browsing/ping_manager.cc File chrome/browser/safe_browsing/ping_manager.cc (right): https://codereview.chromium.org/2361963002/diff/1/chrome/browser/safe_browsing/ping_manager.cc#newcode155 chrome/browser/safe_browsing/ping_manager.cc:155: hit_report.post_data)); On 2016/09/26 at 19:55:39, lpz wrote: > ...
4 years, 2 months ago (2016-09-26 20:13:57 UTC) #27
lpz
mef@chromium.org: Please review changes in net_log_event_type_list.h
4 years, 2 months ago (2016-09-27 18:40:57 UTC) #33
mef
lgtm
4 years, 2 months ago (2016-09-30 14:26:26 UTC) #34
vakh (use Gerrit instead)
lgtm Drive-by review. Thanks for the good work! https://codereview.chromium.org/2361963002/diff/80001/chrome/browser/safe_browsing/ping_manager.cc File chrome/browser/safe_browsing/ping_manager.cc (right): https://codereview.chromium.org/2361963002/diff/80001/chrome/browser/safe_browsing/ping_manager.cc#newcode147 chrome/browser/safe_browsing/ping_manager.cc:147: std::string ...
4 years, 2 months ago (2016-09-30 16:05:59 UTC) #35
mmenke
Optional drive by comment, don't wait for a signoff from me on this CL. https://codereview.chromium.org/2361963002/diff/80001/net/log/net_log_event_type_list.h ...
4 years, 2 months ago (2016-10-03 15:11:46 UTC) #37
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/2361963002/100001
4 years, 2 months ago (2016-10-04 17:33:22 UTC) #45
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-10-04 17:38:56 UTC) #47
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/f69809c4d3c28423bf1c11fce30dfd0360fdd2df Cr-Commit-Position: refs/heads/master@{#422849}
4 years, 2 months ago (2016-10-04 17:41:18 UTC) #49
lpz
4 years, 2 months ago (2016-10-04 18:48:32 UTC) #50
Message was sent while issue was closed.
https://codereview.chromium.org/2361963002/diff/80001/chrome/browser/safe_bro...
File chrome/browser/safe_browsing/ping_manager.cc (right):

https://codereview.chromium.org/2361963002/diff/80001/chrome/browser/safe_bro...
chrome/browser/safe_browsing/ping_manager.cc:147: std::string post_data_base64 =
"";
On 2016/09/30 16:05:59, vakh (Varun Khaneja) wrote:
> you may be able to leave out the explicit initialization since the default
> constructor creates an empty string.

Done.

https://codereview.chromium.org/2361963002/diff/80001/chrome/browser/safe_bro...
chrome/browser/safe_browsing/ping_manager.cc:173: std::string report_base64 =
"";
On 2016/09/30 16:05:59, vakh (Varun Khaneja) wrote:
> same here

Done.

https://codereview.chromium.org/2361963002/diff/80001/net/log/net_log_event_t...
File net/log/net_log_event_type_list.h (right):

https://codereview.chromium.org/2361963002/diff/80001/net/log/net_log_event_t...
net/log/net_log_event_type_list.h:3034: //            that is being sent (eg:
ThreatReport, SafeBrowsingHit)>
On 2016/10/03 15:11:46, mmenke wrote:
> Is this completely redundant with the corresponding begin phase event?  If so,
> should probably remove it.

Yes, redundant. Removed.

Powered by Google App Engine
This is Rietveld 408576698