Closed Bug 2050473 Opened 2 months ago Closed 2 months ago

Add cross-platform support for DLP framework (but not the content analysis backend)

Categories

(Enterprise Products :: Firefox, enhancement)

enhancement

Tracking

(firefox154 fixed)

RESOLVED FIXED
Tracking Status
firefox154 --- fixed

People

(Reporter: jmendez, Assigned: gstoll)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

The existing feature is supported on Windows only because the content analysis sdk is Windows only. After extracting the content analysis sdk communication to its own backend, add cross platform support for any of the non-sdk pieces so that the built-in backend can work on all platforms.

From a simple scan this appears to mainly affect the data for the printing interception point.

Move the Windows-specific parts (i.e. converting printed data to a HANDLE)
to the ExternalAgentBackend. Also abstract out which backend we're using
by calling into ContentAnalysisBackendFactory.

Just replace calls to the old printDataHandle and printDataSize
with getPrintData().

Following the procedure here:
https://firefox-source-docs.mozilla.org/code-quality/typescript/updatingTypes.html
I'm updating this now because of the changes to nsIContentAnalysisRequest.
Unfortunately this pulls in a bunch of changes since the last time someone
did this :-(

When I changed nsIContentAnalysisRequest to have a getPrintData method,
I had to chase down all the places where we defined ContentAnalysisRequest-like
structures in JavaScript (because accessing an undefined field in Javascript
just returns undefined, but calling an undefined method is an error). This
centralizes the creation of these fake objects with
ContentAnalysisUtils.createContentAnalysisRequest()

It also revealed that the drop code in browser-custom-element.mjs was
setting a uri member of the request which should have been url instead.
Part 5 adds tests for this which we somehow missed :-(

Pushed by gstoll@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3495ca8a10a0 https://hg.mozilla.org/integration/autoland/rev/d715ffea2461 part 1 - make core Content Analysis code cross-platform r=jmendez,dlp-reviewers,handyman https://github.com/mozilla-firefox/firefox/commit/431c272f54ed https://hg.mozilla.org/integration/autoland/rev/35db5fb099a1 part 2 - update Content Analysis tests r=jmendez,dlp-reviewers,handyman https://github.com/mozilla-firefox/firefox/commit/eba2837dd013 https://hg.mozilla.org/integration/autoland/rev/8fe5a62a853a part 3 - update TypeScript type definitions r=jmendez https://github.com/mozilla-firefox/firefox/commit/4f0bd278d618 https://hg.mozilla.org/integration/autoland/rev/fc8afe97162e part 4 - make helper function to create ContentAnalysisRequest r=jmendez,dlp-reviewers,tgiles,handyman https://github.com/mozilla-firefox/firefox/commit/c3fcedb175e6 https://hg.mozilla.org/integration/autoland/rev/08001c731b25 part 5 - update ContentAnalysis DND tests to check the URL r=jmendez,dlp-reviewers,handyman
Pushed by nfay@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/242d421c0ab7 https://hg.mozilla.org/integration/autoland/rev/58066b032082 Revert "Bug 2050473 part 5 - update ContentAnalysis DND tests to check the URL r=jmendez,dlp-reviewers,handyman" for causing build bustages

Backed out for causing build bustages

Backout link

Push with failures

Failure log

Flags: needinfo?(gstoll)
Flags: needinfo?(gstoll)
Pushed by imoraru@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/feecc98f6bde https://hg.mozilla.org/mozilla-central/rev/9433023efff8 part 1 - make core Content Analysis code cross-platform r=jmendez,dlp-reviewers,handyman https://github.com/mozilla-firefox/firefox/commit/18f469aeb6ab https://hg.mozilla.org/mozilla-central/rev/4e4df4455acb part 2 - update Content Analysis tests r=jmendez,dlp-reviewers,handyman https://github.com/mozilla-firefox/firefox/commit/41cf1805fc2c https://hg.mozilla.org/mozilla-central/rev/f0043bf093c5 part 3 - update TypeScript type definitions r=jmendez https://github.com/mozilla-firefox/firefox/commit/8d3e80b1c0cc https://hg.mozilla.org/mozilla-central/rev/fddf85345f53 part 4 - make helper function to create ContentAnalysisRequest r=jmendez,dlp-reviewers,tgiles,handyman https://github.com/mozilla-firefox/firefox/commit/cad6d0fceb16 https://hg.mozilla.org/mozilla-central/rev/c4c160895ae2 part 5 - update ContentAnalysis DND tests to check the URL r=jmendez,dlp-reviewers,handyman

Marking this one to be skipped for manual testing as there's not much for QA to check here (correct me if I'm wrong). Thanks!

Flags: qe-verify-
Regressions: 2051878
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: