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

Issue 2737763002: Convert utility process Safe Browsing ZIP/DMG Analyzer IPC to mojo (Closed)

Created:
3 years, 9 months ago by Noel Gordon
Modified:
3 years, 9 months ago
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), grt+watch_chromium.org, mac-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, l, Robert Sesek
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Convert utility process Safe Browsing ZIP/DMG Analyzer IPC to mojo Add SafeArchiveAnalyzer mojom service used to inspect ZIP / DMG file archives for safe browsing download protection. Expose the mojo to the browser via the utility process policy file. Update clients to call the service using a mojo utility client, remove all dependencies on UtilityProcessHostClient. Add native traits for the file analyze results. Align the ZIP/DMG clients: make their API's match, remove class base::File fields (curry the file(s) to the analyzer step), and remove ZIP client temp file clean-up code (not needed since the utility process now owns the files). Covered by existing tests: SandboxedDMGAnalyzerTest.AnalyzeDMG, SandboxedZipAnalyzerTest.* both of which use a content::InProcessUtilityThreadHelper viz., SafeArchiveAnalyzer mojo is called by these tests. BUG=597124 Review-Url: https://codereview.chromium.org/2737763002 Cr-Commit-Position: refs/heads/master@{#456255} Committed: https://chromium.googlesource.com/chromium/src/+/31e7b9090b8a1301e5c51a47f5bbd5bbe37e8914

Patch Set 1 : Remove gfx traits. Result: all-red trys, looks like a gn BUILD file problem. #

Patch Set 2 : Allow circular includes :common to :mojo_bindings so the [Native] trait works. #

Patch Set 3 : Ditch file members: curry them to AnalyzeFile, simplifies file clean-up (it's automatic). #

Patch Set 4 : MACOSX decided the matter: call it ResultsCallback (now will WIN complain?). #

Patch Set 5 : ResultCallback and ResultsCallback (sandboxed_zip_analyzer_unittest.cc complained). #

Patch Set 6 : Use ResultCallback: make sandboxed_dmg_analyzer_mac_unittest.cc conform. #

Patch Set 7 : Minor comment fixes. #

Total comments: 5

Patch Set 8 : Tweak BUILD.gn comment. #

Total comments: 4

Patch Set 9 : Move using Results into class. #

Patch Set 10 : Add //components/safe_browsing:csd_proto to typemap deps. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+286 lines, -361 lines) Patch
M chrome/browser/chrome_content_utility_manifest_overlay.json View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h View 1 2 3 4 5 6 7 8 1 chunk +33 lines, -32 lines 0 comments Download
M chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc View 1 2 4 5 1 chunk +46 lines, -63 lines 0 comments Download
M chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/sandboxed_zip_analyzer.h View 1 2 3 4 5 6 7 8 2 chunks +38 lines, -55 lines 0 comments Download
M chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc View 1 2 4 1 chunk +58 lines, -108 lines 0 comments Download
M chrome/common/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/common/chrome_utility_messages.h View 3 chunks +0 lines, -33 lines 0 comments Download
A chrome/common/safe_archive_analyzer.mojom View 1 2 3 4 5 6 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/common/safe_archive_analyzer.typemap View 1 2 3 4 5 6 7 8 9 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/typemaps.gni View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/utility/chrome_content_utility_client.h View 2 chunks +1 line, -14 lines 0 comments Download
M chrome/utility/chrome_content_utility_client.cc View 1 2 7 chunks +50 lines, -52 lines 2 comments Download

Messages

Total messages: 89 (68 generated)
Noel Gordon
sammc, tibell for the mojo and client class updates - client class impls were not ...
3 years, 9 months ago (2017-03-08 11:03:27 UTC) #47
jochen (gone - plz use gerrit)
i'll wait for sammc & tibell to finish their reviews
3 years, 9 months ago (2017-03-08 18:52:02 UTC) #51
tibell
lgtm https://codereview.chromium.org/2737763002/diff/180001/chrome/common/safe_archive_analyzer.mojom File chrome/common/safe_archive_analyzer.mojom (right): https://codereview.chromium.org/2737763002/diff/180001/chrome/common/safe_archive_analyzer.mojom#newcode15 chrome/common/safe_archive_analyzer.mojom:15: // download protection, given a |temporary_file| used to ...
3 years, 9 months ago (2017-03-08 23:55:47 UTC) #52
Noel Gordon
https://codereview.chromium.org/2737763002/diff/180001/chrome/common/safe_archive_analyzer.mojom File chrome/common/safe_archive_analyzer.mojom (right): https://codereview.chromium.org/2737763002/diff/180001/chrome/common/safe_archive_analyzer.mojom#newcode15 chrome/common/safe_archive_analyzer.mojom:15: // download protection, given a |temporary_file| used to extract ...
3 years, 9 months ago (2017-03-09 02:24:59 UTC) #53
Sam McNally
lgtm https://codereview.chromium.org/2737763002/diff/180001/chrome/common/BUILD.gn File chrome/common/BUILD.gn (right): https://codereview.chromium.org/2737763002/diff/180001/chrome/common/BUILD.gn#newcode522 chrome/common/BUILD.gn:522: # the sources += [...] protobuf include files. ...
3 years, 9 months ago (2017-03-09 08:38:58 UTC) #54
Noel Gordon
On 2017/03/09 08:38:58, Sam McNally wrote: > lgtm > > https://codereview.chromium.org/2737763002/diff/180001/chrome/common/BUILD.gn > File chrome/common/BUILD.gn (right): ...
3 years, 9 months ago (2017-03-09 08:47:34 UTC) #55
Noel Gordon
https://codereview.chromium.org/2737763002/diff/180001/chrome/typemaps.gni File chrome/typemaps.gni (right): https://codereview.chromium.org/2737763002/diff/180001/chrome/typemaps.gni#newcode6 chrome/typemaps.gni:6: "//chrome/common/safe_archive_analyzer.typemap", Also, this part vexed me. Just shoved it ...
3 years, 9 months ago (2017-03-09 08:53:21 UTC) #56
Sam McNally
On 2017/03/09 08:47:34, noel gordon wrote: > On 2017/03/09 08:38:58, Sam McNally wrote: > > ...
3 years, 9 months ago (2017-03-09 08:54:39 UTC) #57
Noel Gordon
On 2017/03/09 08:54:39, Sam McNally wrote: > On 2017/03/09 08:47:34, noel gordon wrote: > > ...
3 years, 9 months ago (2017-03-09 08:56:19 UTC) #58
Sam McNally
https://codereview.chromium.org/2737763002/diff/180001/chrome/typemaps.gni File chrome/typemaps.gni (right): https://codereview.chromium.org/2737763002/diff/180001/chrome/typemaps.gni#newcode6 chrome/typemaps.gni:6: "//chrome/common/safe_archive_analyzer.typemap", On 2017/03/09 08:53:21, noel gordon wrote: > Also, ...
3 years, 9 months ago (2017-03-09 08:58:28 UTC) #59
Noel Gordon
On 2017/03/09 08:56:19, noel gordon wrote: > On 2017/03/09 08:54:39, Sam McNally wrote: > > ...
3 years, 9 months ago (2017-03-09 09:14:25 UTC) #62
jochen (gone - plz use gerrit)
lgtm
3 years, 9 months ago (2017-03-09 11:29:51 UTC) #65
dcheng
lgtm with nits https://codereview.chromium.org/2737763002/diff/200001/chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h File chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h (right): https://codereview.chromium.org/2737763002/diff/200001/chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h#newcode18 chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h:18: using Results = zip_analyzer::Results; Nit: no ...
3 years, 9 months ago (2017-03-10 04:13:43 UTC) #66
Noel Gordon
Bots went red here. Analyze step failed most bots. Will look a that next. https://codereview.chromium.org/2737763002/diff/200001/chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h ...
3 years, 9 months ago (2017-03-10 14:53:17 UTC) #73
Noel Gordon
On 2017/03/10 14:53:17, noel gordon wrote: > Bots went red here. Analyze step failed most ...
3 years, 9 months ago (2017-03-10 15:00:33 UTC) #74
Noel Gordon
https://codereview.chromium.org/2737763002/diff/240001/chrome/utility/chrome_content_utility_client.cc File chrome/utility/chrome_content_utility_client.cc (right): https://codereview.chromium.org/2737763002/diff/240001/chrome/utility/chrome_content_utility_client.cc#newcode153 chrome/utility/chrome_content_utility_client.cc:153: DCHECK(temporary_file.IsValid()); @sammc, these DCHECK are redundant, no? Mojo won't ...
3 years, 9 months ago (2017-03-10 15:19:31 UTC) #75
Noel Gordon
https://codereview.chromium.org/2737763002/diff/240001/chrome/utility/chrome_content_utility_client.cc File chrome/utility/chrome_content_utility_client.cc (right): https://codereview.chromium.org/2737763002/diff/240001/chrome/utility/chrome_content_utility_client.cc#newcode153 chrome/utility/chrome_content_utility_client.cc:153: DCHECK(temporary_file.IsValid()); On 2017/03/10 15:19:31, noel gordon wrote: > @sammc, ...
3 years, 9 months ago (2017-03-10 15:38:51 UTC) #76
Noel Gordon
Bot all green, will try to land.
3 years, 9 months ago (2017-03-11 01:57:46 UTC) #79
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/2737763002/240001
3 years, 9 months ago (2017-03-11 01:58:09 UTC) #82
commit-bot: I haz the power
Committed patchset #10 (id:240001) as https://chromium.googlesource.com/chromium/src/+/31e7b9090b8a1301e5c51a47f5bbd5bbe37e8914
3 years, 9 months ago (2017-03-11 02:04:19 UTC) #85
Noel Gordon
3 years, 9 months ago (2017-03-11 06:15:01 UTC) #86
Message was sent while issue was closed.
On 2017/03/11 02:04:19, commit-bot: I haz the power wrote:
> Committed patchset #10 (id:240001) as
>
https://chromium.googlesource.com/chromium/src/+/31e7b9090b8a1301e5c51a47f5bb...

Pinged on https://crbug.com/696529#c14 ... there are intermittent failures on
the Mac builder due to a failed compile step

[1912/49531] ACTION //chrome/test:mac_safe_browsing_test_data

https://crbug.com/696529 seems to cover the issues, +cc rsesek@ on this CL just
in case the change made the problem worse.

Powered by Google App Engine
This is Rietveld 408576698