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

Issue 1979153002: Use FileTypePolicies for is_archive and is_supported classifications. (Closed)

Created:
4 years, 7 months ago by Nathan Parker
Modified:
4 years, 7 months ago
Reviewers:
asanka, Lei Zhang
CC:
asanka, chromium-reviews, grt+watch_chromium.org, Jialiu Lin
Base URL:
https://chromium.googlesource.com/chromium/src.git@split_by_platform
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use FileTypePolicies as authoritative source for is_archive and is_supported download classifications. * Replace all usage of download_protection_util.cc functions except for GetDownloadType(). * Enable it for Android since it will be used for chrome-controlled downloads in the future. * Make FileTypePolicies thread safe via locking. It's created and updated from several threads (between the ZipAnalyzer sandbox, SafeBrowsingService, and unit/browser tests). It'll only be accessed during downloads and incident reports, and will be updated less than once per few hours. Coming in following CL: * Replace all usage of download_extensions.h and FileDangerLevel BUG=596555 Committed: https://crrev.com/ac9da06e6e139a110e031dc484757561e9fdeb43 Cr-Commit-Position: refs/heads/master@{#394879}

Patch Set 1 #

Patch Set 2 : fix some comments #

Patch Set 3 : rebase #

Total comments: 17

Patch Set 4 : Switch from Manager->Singleton, nits per Asanka's review #

Total comments: 2

Patch Set 5 : Fix comment, per asanka's review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -759 lines) Patch
M chrome/browser/BUILD.gn View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/browser_resources.grd View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/download/download_danger_prompt.cc View 1 2 3 2 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/safe_browsing/download_protection_service.cc View 1 2 3 4 chunks +7 lines, -8 lines 0 comments Download
M chrome/browser/safe_browsing/incident_reporting/last_download_finder.cc View 1 2 3 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.cc View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/unverified_download_field_trial.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/unverified_download_field_trial_unittest.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/safe_browsing/unverified_download_policy.cc View 1 2 3 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 chunks +13 lines, -3 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 2 chunks +1 line, -1 line 0 comments Download
M chrome/common/BUILD.gn View 1 chunk +12 lines, -4 lines 0 comments Download
M chrome/common/safe_browsing/download_protection_util.h View 1 chunk +0 lines, -15 lines 0 comments Download
M chrome/common/safe_browsing/download_protection_util.cc View 1 2 3 2 chunks +4 lines, -601 lines 0 comments Download
M chrome/common/safe_browsing/download_protection_util_unittest.cc View 1 2 3 1 chunk +0 lines, -49 lines 0 comments Download
M chrome/common/safe_browsing/file_type_policies.h View 1 2 3 4 3 chunks +49 lines, -23 lines 0 comments Download
M chrome/common/safe_browsing/file_type_policies.cc View 1 2 3 8 chunks +74 lines, -17 lines 0 comments Download
M chrome/common/safe_browsing/file_type_policies_unittest.cc View 8 chunks +11 lines, -8 lines 0 comments Download
M chrome/common/safe_browsing/zip_analyzer.cc View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (8 generated)
Nathan Parker
4 years, 7 months ago (2016-05-16 18:36:20 UTC) #4
asanka
Almost there! https://codereview.chromium.org/1979153002/diff/40001/chrome/browser/download/download_danger_prompt.cc File chrome/browser/download/download_danger_prompt.cc (right): https://codereview.chromium.org/1979153002/diff/40001/chrome/browser/download/download_danger_prompt.cc#newcode15 chrome/browser/download/download_danger_prompt.cc:15: #include "chrome/grit/generated_resources.h" Thanks for these. https://codereview.chromium.org/1979153002/diff/40001/chrome/common/safe_browsing/file_type_policies.cc File ...
4 years, 7 months ago (2016-05-18 18:47:54 UTC) #5
Nathan Parker
Thanks for the review. I dropped a number of files from this CL that no ...
4 years, 7 months ago (2016-05-18 23:53:29 UTC) #6
Nathan Parker
thestig@ for OWNERS approval for the following: chrome/browser/BUILD.gn chrome/browser/browser_resources.grd chrome/common/BUILD.gn (This is the first in ...
4 years, 7 months ago (2016-05-19 00:38:46 UTC) #8
Lei Zhang
lgtm if asanka approves. I only looked at the GN/GYP/GRD files.
4 years, 7 months ago (2016-05-19 01:04:35 UTC) #9
asanka
lgtm. thanks! https://codereview.chromium.org/1979153002/diff/60001/chrome/common/safe_browsing/file_type_policies.h File chrome/common/safe_browsing/file_type_policies.h (right): https://codereview.chromium.org/1979153002/diff/60001/chrome/common/safe_browsing/file_type_policies.h#newcode44 chrome/common/safe_browsing/file_type_policies.h:44: // Returns the file extension, with the ...
4 years, 7 months ago (2016-05-19 20:25:58 UTC) #10
Nathan Parker
Thanks! https://codereview.chromium.org/1979153002/diff/60001/chrome/common/safe_browsing/file_type_policies.h File chrome/common/safe_browsing/file_type_policies.h (right): https://codereview.chromium.org/1979153002/diff/60001/chrome/common/safe_browsing/file_type_policies.h#newcode44 chrome/common/safe_browsing/file_type_policies.h:44: // Returns the file extension, with the dot. ...
4 years, 7 months ago (2016-05-19 20:45:19 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1979153002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1979153002/80001
4 years, 7 months ago (2016-05-19 20:46:51 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-19 21:47:35 UTC) #16
commit-bot: I haz the power
4 years, 7 months ago (2016-05-19 21:48:38 UTC) #18
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ac9da06e6e139a110e031dc484757561e9fdeb43
Cr-Commit-Position: refs/heads/master@{#394879}

Powered by Google App Engine
This is Rietveld 408576698