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

Issue 2128583005: DownloadProtection: Add more graceful handling of verdict=UNKNOWN (Closed)

Created:
4 years, 5 months ago by Nathan Parker
Modified:
4 years, 5 months ago
CC:
asvitkine+watch_chromium.org, chromium-reviews, grt+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DownloadProtection: Add more graceful handling of verdict=UNKNOWN This also removes the special case of ignoring verdicts for CRX, which by my read is not possible, and UMA says has been hit once in the last week (weird). Without this, debug builds will DCHECK for some downloads soon. BUG=581044 Committed: https://crrev.com/07f3c37fded2f87ef53577ccaf67280fd52c6301 Cr-Commit-Position: refs/heads/master@{#404510}

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -68 lines) Patch
M chrome/browser/safe_browsing/download_protection_service.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/safe_browsing/download_protection_service.cc View 2 chunks +38 lines, -29 lines 4 comments Download
M chrome/browser/safe_browsing/download_protection_service_unittest.cc View 4 chunks +19 lines, -38 lines 0 comments Download
M chrome/common/safe_browsing/csd.proto View 1 chunk +4 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
Nathan Parker
asanka@: Please review *. Thanks. holte@: Please review histograms.xml. Thanks. -- Nathan
4 years, 5 months ago (2016-07-07 00:01:29 UTC) #2
asanka
lgtm https://codereview.chromium.org/2128583005/diff/1/chrome/browser/safe_browsing/download_protection_service.cc File chrome/browser/safe_browsing/download_protection_service.cc (right): https://codereview.chromium.org/2128583005/diff/1/chrome/browser/safe_browsing/download_protection_service.cc#newcode504 chrome/browser/safe_browsing/download_protection_service.cc:504: default: Nit: Shall we go the route of ...
4 years, 5 months ago (2016-07-07 20:46:59 UTC) #3
Nathan Parker
https://codereview.chromium.org/2128583005/diff/1/chrome/browser/safe_browsing/download_protection_service.cc File chrome/browser/safe_browsing/download_protection_service.cc (right): https://codereview.chromium.org/2128583005/diff/1/chrome/browser/safe_browsing/download_protection_service.cc#newcode504 chrome/browser/safe_browsing/download_protection_service.cc:504: default: On 2016/07/07 20:46:59, asanka wrote: > Nit: Shall ...
4 years, 5 months ago (2016-07-07 21:02:56 UTC) #4
asanka
https://codereview.chromium.org/2128583005/diff/1/chrome/browser/safe_browsing/download_protection_service.cc File chrome/browser/safe_browsing/download_protection_service.cc (right): https://codereview.chromium.org/2128583005/diff/1/chrome/browser/safe_browsing/download_protection_service.cc#newcode504 chrome/browser/safe_browsing/download_protection_service.cc:504: default: On 2016/07/07 at 21:02:55, Nathan Parker wrote: > ...
4 years, 5 months ago (2016-07-07 21:15:11 UTC) #5
Nathan Parker
rkaplow (since holte is OOO now): please review the one-line addition to histograms.xml. Thanks!
4 years, 5 months ago (2016-07-08 17:41:53 UTC) #7
rkaplow
lgtm
4 years, 5 months ago (2016-07-08 17:44:00 UTC) #8
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/2128583005/1
4 years, 5 months ago (2016-07-08 18:41:00 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-08 22:23:27 UTC) #11
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-08 22:23:40 UTC) #12
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/07f3c37fded2f87ef53577ccaf67280fd52c6301 Cr-Commit-Position: refs/heads/master@{#404510}
4 years, 5 months ago (2016-07-08 22:26:42 UTC) #14
Nathan Parker
4 years, 5 months ago (2016-07-11 20:26:22 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/2128583005/diff/1/chrome/browser/safe_browsin...
File chrome/browser/safe_browsing/download_protection_service.cc (right):

https://codereview.chromium.org/2128583005/diff/1/chrome/browser/safe_browsin...
chrome/browser/safe_browsing/download_protection_service.cc:504: default:
On 2016/07/07 21:15:11, asanka wrote:
> On 2016/07/07 at 21:02:55, Nathan Parker wrote:
> > On 2016/07/07 20:46:59, asanka wrote:
> > > Nit: Shall we go the route of eliminating the default label? That way the
> > > compiler will throw an error if a new verdict is added that's not handled
> here.
> > > If the incoming proto has an unrecognized verdict, it should fail to
parse,
> > > right?
> > 
> > I don't think it'd fail to parse... hence I'm catching it here. Though I
can't
> find docs to that effect.
> > 
> > I think the no-default style works well only when the value is set solely
> within the same C++ binary, so the compiler can enforce the type.
> > 
> > I was relying on it _not_ failing to parse, so existing chrome binaries will
> be able to handle the new "UNKNOWN" value with the old code that doesn't know
> about it.
> 
> Ah. TIL. Acknowledged.

Apparently I was wrong.  The old code apparently can't parse the proto with the
new enum value, so I'm seeing a histogram value of INVALID_RESPONSE_PROTO.  The
result (unknown) is the same.

Powered by Google App Engine
This is Rietveld 408576698