|
|
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. |
DescriptionConvert 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
Messages
Total messages: 89 (68 generated)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clan...) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #1 (id:1) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...) cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #2 (id:40001) has been deleted
Patchset #2 (id:60001) has been deleted
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Convert utility process Safe Browsing ZIP / DMG Analyzer IPC to mojo BUG=597124 ========== to ========== 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. 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 temporary file clean-up code (not neeed since the utility process now owns the files). ResultCallback: use it in clients and unit tests (fix the DMG unit test). Covered by existing tests: SandboxedDMGAnalyzerTest.AnalyzeDMG, SandboxedZipAnalyzerTest.* both of which use a content::InProcessUtilityThreadHelper viz., SafeArchiveAnalyzer mojo is called by these tests. BUG=597124 ==========
Description was changed from ========== 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. 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 temporary file clean-up code (not neeed since the utility process now owns the files). ResultCallback: use it in clients and unit tests (fix the DMG unit test). Covered by existing tests: SandboxedDMGAnalyzerTest.AnalyzeDMG, SandboxedZipAnalyzerTest.* both of which use a content::InProcessUtilityThreadHelper viz., SafeArchiveAnalyzer mojo is called by these tests. BUG=597124 ========== to ========== 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. 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 temporary file clean-up code (not neeed since the utility process now owns the files). ResultCallback: use it in clients and the DMG unit test. Covered by existing tests: SandboxedDMGAnalyzerTest.AnalyzeDMG, SandboxedZipAnalyzerTest.* both of which use a content::InProcessUtilityThreadHelper viz., SafeArchiveAnalyzer mojo is called by these tests. BUG=597124 ==========
Description was changed from ========== 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. 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 temporary file clean-up code (not neeed since the utility process now owns the files). ResultCallback: use it in clients and the DMG unit test. Covered by existing tests: SandboxedDMGAnalyzerTest.AnalyzeDMG, SandboxedZipAnalyzerTest.* both of which use a content::InProcessUtilityThreadHelper viz., SafeArchiveAnalyzer mojo is called by these tests. BUG=597124 ========== to ========== 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. 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 temporary file clean-up code (not neeed since the utility process now owns the files). ResultCallback: use it in both clients and in the DMG unit test. Covered by existing tests: SandboxedDMGAnalyzerTest.AnalyzeDMG, SandboxedZipAnalyzerTest.* both of which use a content::InProcessUtilityThreadHelper viz., SafeArchiveAnalyzer mojo is called by these tests. BUG=597124 ==========
Description was changed from ========== 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. 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 temporary file clean-up code (not neeed since the utility process now owns the files). ResultCallback: use it in both clients and in the DMG unit test. Covered by existing tests: SandboxedDMGAnalyzerTest.AnalyzeDMG, SandboxedZipAnalyzerTest.* both of which use a content::InProcessUtilityThreadHelper viz., SafeArchiveAnalyzer mojo is called by these tests. BUG=597124 ========== to ========== 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. 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 temporary file clean-up code (not neeed since the utility process now owns the files). ResultCallback: use it in both clients and in the DMG unit test. Covered by existing tests: SandboxedDMGAnalyzerTest.AnalyzeDMG, SandboxedZipAnalyzerTest.* both of which use a content::InProcessUtilityThreadHelper viz., SafeArchiveAnalyzer mojo will be called by these tests. BUG=597124 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== 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. 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 temporary file clean-up code (not neeed since the utility process now owns the files). ResultCallback: use it in both clients and in the DMG unit test. Covered by existing tests: SandboxedDMGAnalyzerTest.AnalyzeDMG, SandboxedZipAnalyzerTest.* both of which use a content::InProcessUtilityThreadHelper viz., SafeArchiveAnalyzer mojo will be called by these tests. BUG=597124 ========== to ========== 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 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 ==========
Description was changed from ========== 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 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 ========== to ========== 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 result. 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 ==========
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
noel@chromium.org changed reviewers: + dcheng@chromium.org, jochen@chromium.org, sammc@chromium.org, tibell@chromium.org
sammc, tibell for the mojo and client class updates - client class impls were not quite the same, I made them more similar, future work might be for the owners of these clients to have one client maybe - file analyze results contain a protobuf, go [Native] with traits to handle that. - thanks for the help with the build files to get the native trait to work. dcheng - IPC security jochen - OWNERS
Description was changed from ========== 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 result. 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 ========== to ========== 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 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
i'll wait for sammc & tibell to finish their reviews
lgtm https://codereview.chromium.org/2737763002/diff/180001/chrome/common/safe_arc... File chrome/common/safe_archive_analyzer.mojom (right): https://codereview.chromium.org/2737763002/diff/180001/chrome/common/safe_arc... chrome/common/safe_archive_analyzer.mojom:15: // download protection, given a |temporary_file| used to extract files The |temporary_file| confuses me. What is it for? I'd expect a temporary directory to unpack the zip file into, not a file.
https://codereview.chromium.org/2737763002/diff/180001/chrome/common/safe_arc... File chrome/common/safe_archive_analyzer.mojom (right): https://codereview.chromium.org/2737763002/diff/180001/chrome/common/safe_arc... chrome/common/safe_archive_analyzer.mojom:15: // download protection, given a |temporary_file| used to extract files On 2017/03/08 23:55:47, tibell wrote: > The |temporary_file| confuses me. What is it for? I'd expect a temporary > directory to unpack the zip file into, not a file. Given the chrome_utility_messages.h API, they only required a temporary _file_, not a directory, so I assume (/me not looking at their code) that they extract files from the extension zip one after the other: extract file, check file, move on to the next file. Shame that a temporary file needs to be on this API, but since this code runs in a sandboxed utility process (not allowed to open files), the API has to provide the temporary file they need to get the job done.
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... chrome/common/BUILD.gn:522: # the sources += [...] protobuf include files. Is the "sources += [...]" part intended?
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): > > https://codereview.chromium.org/2737763002/diff/180001/chrome/common/BUILD.gn... > chrome/common/BUILD.gn:522: # the sources += [...] protobuf include files. > Is the "sources += [...]" part intended? Yeah, I was trying to refer to the sources += [...] just above, where the includes files we depend on are listed. Got a better suggestion?
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#ne... chrome/typemaps.gni:6: "//chrome/common/safe_archive_analyzer.typemap", Also, this part vexed me. Just shoved it in here since this .gni file existed. I noticed instant.mojo near my changes to in chrome/common/BUILD.gn, and this is where they put their typemap. Alternative would to be to add chrome/common/typemaps.gni and add put my typemap therein.
On 2017/03/09 08:47:34, noel gordon wrote: > 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): > > > > > https://codereview.chromium.org/2737763002/diff/180001/chrome/common/BUILD.gn... > > chrome/common/BUILD.gn:522: # the sources += [...] protobuf include files. > > Is the "sources += [...]" part intended? > > Yeah, I was trying to refer to the sources += [...] just above, where the > includes files we depend on are listed. Got a better suggestion? How about something like the following? # safe_archive_analyzer.mojom has a [Native] trait that depends on # the protobuf headers in the sources list above.
On 2017/03/09 08:54:39, Sam McNally wrote: > On 2017/03/09 08:47:34, noel gordon wrote: > > 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): > > > > > > > > > https://codereview.chromium.org/2737763002/diff/180001/chrome/common/BUILD.gn... > > > chrome/common/BUILD.gn:522: # the sources += [...] protobuf include files. > > > Is the "sources += [...]" part intended? > > > > Yeah, I was trying to refer to the sources += [...] just above, where the > > includes files we depend on are listed. Got a better suggestion? > > How about something like the following? > # safe_archive_analyzer.mojom has a [Native] trait that depends on > # the protobuf headers in the sources list above. Sounds good to me. I will make that change.
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#ne... chrome/typemaps.gni:6: "//chrome/common/safe_archive_analyzer.typemap", On 2017/03/09 08:53:21, noel gordon wrote: > Also, this part vexed me. Just shoved it in here since this .gni file existed. > I noticed instant.mojo near my changes to in chrome/common/BUILD.gn, and this > is where they put their typemap. > > Alternative would to be to add chrome/common/typemaps.gni and add put my typemap > therein. There aren't any guidelines that I know of on how fine-grained typemaps.gni files should be. Perhaps we could improve that.
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/03/09 08:56:19, noel gordon wrote: > On 2017/03/09 08:54:39, Sam McNally wrote: > > On 2017/03/09 08:47:34, noel gordon wrote: > > > On 2017/03/09 08:38:58, Sam McNally wrote: > https://codereview.chromium.org/2737763002/diff/180001/chrome/common/BUILD.gn... > > > > chrome/common/BUILD.gn:522: # the sources += [...] protobuf include files. > > > > Is the "sources += [...]" part intended? > > > > > > Yeah, I was trying to refer to the sources += [...] just above, where the > > > includes files we depend on are listed. Got a better suggestion? > > > > How about something like the following? > > # safe_archive_analyzer.mojom has a [Native] trait that depends on > > # the protobuf headers in the sources list above. > > Sounds good to me. I will make that change. Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
lgtm with nits https://codereview.chromium.org/2737763002/diff/200001/chrome/browser/safe_br... File chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h (right): https://codereview.chromium.org/2737763002/diff/200001/chrome/browser/safe_br... chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h:18: using Results = zip_analyzer::Results; Nit: no using declaration in header (Results is a fairly generic name, and while it's namespaced under safe_browsing, it's probably best to just explicitly qualify it: we had some recent breakage due to using declarations in Blink) Moving this inside the class decl would be one way to resolve potential ambiguity. https://codereview.chromium.org/2737763002/diff/200001/chrome/browser/safe_br... File chrome/browser/safe_browsing/sandboxed_zip_analyzer.h (right): https://codereview.chromium.org/2737763002/diff/200001/chrome/browser/safe_br... chrome/browser/safe_browsing/sandboxed_zip_analyzer.h:18: using Results = zip_analyzer::Results; Ditto.
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by noel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Bots went red here. Analyze step failed most bots. Will look a that next. https://codereview.chromium.org/2737763002/diff/200001/chrome/browser/safe_br... File chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h (right): https://codereview.chromium.org/2737763002/diff/200001/chrome/browser/safe_br... chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h:18: using Results = zip_analyzer::Results; On 2017/03/10 04:13:43, dcheng wrote: > Nit: no using declaration in header (Results is a fairly generic name, and while > it's namespaced under safe_browsing, it's probably best to just explicitly > qualify it: we had some recent breakage due to using declarations in Blink) Right. > Moving this inside the class decl would be one way to resolve potential > ambiguity. Done. https://codereview.chromium.org/2737763002/diff/200001/chrome/browser/safe_br... File chrome/browser/safe_browsing/sandboxed_zip_analyzer.h (right): https://codereview.chromium.org/2737763002/diff/200001/chrome/browser/safe_br... chrome/browser/safe_browsing/sandboxed_zip_analyzer.h:18: using Results = zip_analyzer::Results; On 2017/03/10 04:13:43, dcheng wrote: > Ditto. Ditto Done.
On 2017/03/10 14:53:17, noel gordon wrote: > Bots went red here. Analyze step failed most bots. Will look at that next. bot % gen //out/Debug --check ERROR at //chrome/common/safe_browsing/zip_analyzer.h:12:11: Include not allowed. #include "components/safe_browsing/csd.pb.h" ^-------------------------------- It is not in any dependency of //chrome/common:mojo_bindings The include file is in the target(s): //components/safe_browsing:csd_proto //components/safe_browsing:csd_proto_gen at least one of which should somehow be reachable. GN gen failed: 1 Added the first, //components/safe_browsing:csd_proto, to safe_archive_analyzer.typemap deps = [ "//chrome/common/safe_browsing:proto", + "//components/safe_browsing:csd_proto", ] and % gen check out/Release no longer complains. Bots trying that now patch set #10.
https://codereview.chromium.org/2737763002/diff/240001/chrome/utility/chrome_... File chrome/utility/chrome_content_utility_client.cc (right): https://codereview.chromium.org/2737763002/diff/240001/chrome/utility/chrome_... chrome/utility/chrome_content_utility_client.cc:153: DCHECK(temporary_file.IsValid()); @sammc, these DCHECK are redundant, no? Mojo won't tx/rx an invalid base::File, IIRC (blocked at type validation time).
https://codereview.chromium.org/2737763002/diff/240001/chrome/utility/chrome_... File chrome/utility/chrome_content_utility_client.cc (right): https://codereview.chromium.org/2737763002/diff/240001/chrome/utility/chrome_... chrome/utility/chrome_content_utility_client.cc:153: DCHECK(temporary_file.IsValid()); On 2017/03/10 15:19:31, noel gordon wrote: > @sammc, these DCHECK are redundant, no? Mojo won't tx/rx an invalid base::File, > IIRC (blocked at type validation time). Reading traits, mojo can rx a kInvalidPlatformFile here. The two callers we have bail if given invalid files, they never send them here.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Bot all green, will try to land.
The CQ bit was checked by noel@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from sammc@chromium.org, tibell@chromium.org, jochen@chromium.org, dcheng@chromium.org Link to the patchset: https://codereview.chromium.org/2737763002/#ps240001 (title: "Add //components/safe_browsing:csd_proto to typemap deps.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 240001, "attempt_start_ts": 1489197476318640, "parent_rev": "eaeb5c6fe84d2ae813eef86e44a85b767c53b612", "commit_rev": "31e7b9090b8a1301e5c51a47f5bbd5bbe37e8914"}
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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/+/31e7b9090b8a1301e5c51a47f5bb... ==========
Message was sent while issue was closed.
Committed patchset #10 (id:240001) as https://chromium.googlesource.com/chromium/src/+/31e7b9090b8a1301e5c51a47f5bb...
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.
Message was sent while issue was closed.
Description was changed from ========== 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/+/31e7b9090b8a1301e5c51a47f5bb... ========== to ========== 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/+/31e7b9090b8a1301e5c51a47f5bb... ==========
Message was sent while issue was closed.
noel@chromium.org changed reviewers: + rsesek@chromium.org
Message was sent while issue was closed.
noel@chromium.org changed reviewers: - rsesek@chromium.org |