Commit Graph
181 Commits
Author SHA1 Message Date
Sylvestre Ledru 9887c45a7e Bug 2036402 - Apply std::move in toolkit where values can be moved instead of copied r=credential-management-reviewers,ai-platform-reviewers,dimi,chutten
Differential Revision: https://phabricator.services.mozilla.com/D298093
2026-05-05 15:20:47 +00:00
serge-sans-paille 8fb9f098cd Bug 2030627 - Activate clang-tidy's bugprone-move-forwarding-reference check r=extension-reviewers,sylvestre,dlp-reviewers,gstoll,robwu
And fixes the few potential bugs found by the linter, yay.

Differential Revision: https://phabricator.services.mozilla.com/D293049
2026-04-16 11:07:24 +00:00
Sylvestre Ledru 6be5ec2fff Bug 2023419 - Remove Emacs/Vim modelines from toolkit/ r=emilio,mkaply,extension-reviewers,credential-management-reviewers,desktop-theme-reviewers,win-reviewers,webcompat-reviewers,core-sessionstore-reviewers,profiles-reviewers,ai-platform-reviewers,mconley,twisniewski,gstoll,jhirsch,rpl,dimi,akulyk
Differential Revision: https://phabricator.services.mozilla.com/D287874
2026-04-14 12:56:19 +00:00
agoloman ae99dfb565 Revert "Bug 2023419: apply code formatting via Lando" for causing bc failures @browser_sendQuery.js.
This reverts commit aa15b809d9.

Revert "Bug 2023419 - Remove Emacs/Vim modelines from toolkit/ - follow up r=emilio"

This reverts commit c659385796.

Revert "Bug 2023419 - Remove Emacs/Vim modelines from toolkit/ r=emilio,mkaply,extension-reviewers,credential-management-reviewers,desktop-theme-reviewers,win-reviewers,webcompat-reviewers,core-sessionstore-reviewers,profiles-reviewers,ai-platform-reviewers,mconley,twisniewski,gstoll,jhirsch,rpl,dimi,akulyk"

This reverts commit 1e55e9bf9b.
2026-04-13 13:06:21 +00:00
Sylvestre Ledru 1e55e9bf9b Bug 2023419 - Remove Emacs/Vim modelines from toolkit/ r=emilio,mkaply,extension-reviewers,credential-management-reviewers,desktop-theme-reviewers,win-reviewers,webcompat-reviewers,core-sessionstore-reviewers,profiles-reviewers,ai-platform-reviewers,mconley,twisniewski,gstoll,jhirsch,rpl,dimi,akulyk
Differential Revision: https://phabricator.services.mozilla.com/D287874
2026-04-13 11:30:51 +00:00
Nika Layzell 5f0f9dd22a Bug 2020817 - Part 4: Annotate & clean up nsACString callers of BeginReading/Data, r=xpcom-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,toolkit-telemetry-reviewers-rotation,layout-reviewers,dom-worker-reviewers,gfx-reviewers,webgpu-reviewers,necko-reviewers,dom-core,smaug,handyman,emilio,pehrsons,kershaw,timhuang,edenchuang,padenot,bradwerth
This is a large number of largely mechanical changes. When possible, the code
was called to directly call `.get()` instead, performing the assertions
manually. In many places PromiseFlatCString() calls were added to dynamically
copy the strings into null terminated buffers if the string was not null
terminated.

Differential Revision: https://phabricator.services.mozilla.com/D286158
2026-03-25 08:23:04 +00:00
rperta f5848b1deb Revert "Bug 2023419: apply code formatting via Lando" for causing bc failures at browser_sendQuery.js and browser_console_to_mozlog.js
This reverts commit f8a9770c7d.

This reverts commit 47e16fbdd2.

This reverts commit 9f363abaef.
2026-03-20 06:37:54 +00:00
Sylvestre Ledru 9f363abaef Bug 2023419 - Remove Emacs/Vim modelines from toolkit/ r=emilio,mkaply,extension-reviewers,credential-management-reviewers,desktop-theme-reviewers,win-reviewers,webcompat-reviewers,profiles-reviewers,ai-ondevice-reviewers,mconley,twisniewski,gstoll,jhirsch,rpl,dimi,akulyk
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287874
2026-03-20 04:55:48 +00:00
David P. 73cfd9fab8 Bug 1996053: Null check ObserverService use in ContentAnalysis r=dlp-reviewers,gstoll
Most of these are impossible to be null, but for reasons external to the
component.  We shouldn't rely on that.

This is only relevant at shutdown (after observer service shutdown), so it
isn't tested.

Differential Revision: https://phabricator.services.mozilla.com/D272358
2025-11-14 16:20:23 +00:00
serge-sans-paille e0b12d066f Bug 1997163 - Remove unused mfbt inclusion in toolkit/** r=emilio,application-update-reviewers,credential-management-reviewers,win-reviewers,toolkit-telemetry-reviewers,bytesized,gstoll,dimi
Differential Revision: https://phabricator.services.mozilla.com/D270574
2025-10-30 12:27:00 +00:00
agoloman 38026d3a97 Revert "Bug 1997163 - Remove unused mfbt inclusion in toolkit/** r=emilio,application-update-reviewers,credential-management-reviewers,win-reviewers,toolkit-telemetry-reviewers,bytesized,gstoll,dimi" for causing build bustages @Arm64.h.
This reverts commit 81ad911e44.
2025-10-30 10:40:32 +00:00
serge-sans-paille 81ad911e44 Bug 1997163 - Remove unused mfbt inclusion in toolkit/** r=emilio,application-update-reviewers,credential-management-reviewers,win-reviewers,toolkit-telemetry-reviewers,bytesized,gstoll,dimi
Differential Revision: https://phabricator.services.mozilla.com/D270574
2025-10-30 09:28:49 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00
Cristina Horotan 8a1b1970b7 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing Gtest failures on AlreadyAddRefed.h
This reverts commit e98adca292.
2025-10-21 16:16:29 +00:00
serge-sans-paille e98adca292 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 15:05:17 +00:00
Cristina Horotan aab924e90d Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing build bustage at nsBrowserApp.cpp
This reverts commit fd0ffa193c.
2025-10-21 10:44:13 +00:00
serge-sans-paille fd0ffa193c Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 09:44:11 +00:00
Narcis Beleuzu e1e6bbb1c9 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing bustages on Document.cpp
This reverts commit b23c15e927.
2025-10-21 06:34:58 +00:00
serge-sans-paille b23c15e927 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 06:01:36 +00:00
Greg Stoll 34f546683a Bug 1963385 part 6 - move acknowledgement message after Acknowledge() call r=dlp-reviewers,handyman
This fixes some intermittency in the gtests, because now we know the
Acknowledge() call has happened when the test receives the
"dlp-acknowledgement-sent-raw" message and no more calls will be made
to the client.

Differential Revision: https://phabricator.services.mozilla.com/D252575
2025-06-23 15:15:00 +00:00
Greg Stoll 75b0a1dbd4 Bug 1963385 part 5 - add response telemetry for Content Analysis r=dlp-reviewers,handyman
Records the action returned in a response from the DLP agent, as well
as how long the agent took to return a response (roughly). Note that if
the agent pops up some kind of its own WARN dialog, the timing recorded
will include how long it took for the user to pick an option, so this
may not end up being too valuable.

Also includes a bit more shuffling around of test code so the telemetry
tests can use it.

Differential Revision: https://phabricator.services.mozilla.com/D252574
2025-06-23 15:14:57 +00:00
Greg Stoll 3b590596d3 Bug 1963385 part 3 - add requests telemetry for Content Analysis r=dlp-reviewers,handyman
Records requests made (specifically the analysisType and reason), and
also requests allowed/blocked by the allow/deny URL lists.

Differential Revision: https://phabricator.services.mozilla.com/D252572
2025-06-23 15:14:51 +00:00
Greg Stoll d6f7743225 Bug 1963385 part 2 - add connection attempts/failures telemetry for Content Analysis r=dlp-reviewers,handyman
Records connection attempts, retries, and failures (with nsresult).

This also adds a GetCreatingClientForTest() method so that tests can
call to create a client, then SpinEventLoopUntil() until
GetCreatingClientForTest() returns false, and after this point the
telemetry should be recorded.

Also moves some test code from TestContentAnalysis.cpp to
TestContentAnalysisUtils.h so it can be used in the new telemetry gtests.

Note that these new gtests start the agent every time it's needed - this
will be cleaned up in part 4.

Differential Revision: https://phabricator.services.mozilla.com/D252571
2025-06-23 15:14:48 +00:00
Greg Stoll 5e13391727 Bug 1963385 part 1 - add settings telemetry for Content Analysis r=dlp-reviewers,handyman
Records telemetry for the settings used with Content Analysis. Note
that there is no way in C++ to get the default value of a pref that was
set via an Enterprise Policy (with setAndLockPref()) because that method
actually sets the default value, so I had to modify some of my plans for
telemetry to gather. For example, I was going to record interception points
whose Enabled value differed from the default, but instead we record
any interception points whose Enabled value is false. (right now these
are equivalent, but Downloads will be default-off so this will change)

For the allow/deny URL lists I didn't want to record the actual URLs
on those lists, so we really do want to just record whether the values
are different from the default. I hard-coded the default into
ContentAnalysis.cpp, and we can rely on the JS test
test_ca_enterprise_config_with_default_prefs_telemetry() to start failing
if that changes.

Also adds a forceRecreateClientForTest() method to ContentAnalysis that
tests can use to force trying to connect to a client. (since this is when
we record the settings telemetry)

Differential Revision: https://phabricator.services.mozilla.com/D252570
2025-06-23 15:14:45 +00:00
Cristian Tuns abfcb76cf9 Revert "Bug 1963385 part 7 - make tests that terminate the DLP agent wait until the process has terminated" for causing build bustages in ContentAnalysis.cpp r=shtrom
This reverts commit f7fc56b33b.

Revert "Bug 1963385 part 6 - move acknowledgement message after Acknowledge() call r=dlp-reviewers,handyman"

This reverts commit 8b0b44151c.

Revert "Bug 1963385 part 5 - add response telemetry for Content Analysis r=dlp-reviewers,handyman"

This reverts commit 787c19e50d.

Revert "Bug 1963385 part 4 - refactor telemetry tests to avoid starting agent so much r=dlp-reviewers,handyman"

This reverts commit a2160a79f2.

Revert "Bug 1963385 part 3 - add requests telemetry for Content Analysis r=dlp-reviewers,handyman"

This reverts commit 365f87f005.

Revert "Bug 1963385 part 2 - add connection attempts/failures telemetry for Content Analysis r=dlp-reviewers,handyman"

This reverts commit 61133fcba9.

Revert "Bug 1963385 part 1 - add settings telemetry for Content Analysis r=dlp-reviewers,handyman"

This reverts commit 593bbb1f6e.

Differential Revision: https://phabricator.services.mozilla.com/D254333
2025-06-19 08:40:26 +00:00
Greg Stoll 8b0b44151c Bug 1963385 part 6 - move acknowledgement message after Acknowledge() call r=dlp-reviewers,handyman
This fixes some intermittency in the gtests, because now we know the
Acknowledge() call has happened when the test receives the
"dlp-acknowledgement-sent-raw" message and no more calls will be made
to the client.

Differential Revision: https://phabricator.services.mozilla.com/D252575
2025-06-18 22:38:26 +00:00
Greg Stoll 787c19e50d Bug 1963385 part 5 - add response telemetry for Content Analysis r=dlp-reviewers,handyman
Records the action returned in a response from the DLP agent, as well
as how long the agent took to return a response (roughly). Note that if
the agent pops up some kind of its own WARN dialog, the timing recorded
will include how long it took for the user to pick an option, so this
may not end up being too valuable.

Also includes a bit more shuffling around of test code so the telemetry
tests can use it.

Differential Revision: https://phabricator.services.mozilla.com/D252574
2025-06-18 22:38:23 +00:00
Greg Stoll 365f87f005 Bug 1963385 part 3 - add requests telemetry for Content Analysis r=dlp-reviewers,handyman
Records requests made (specifically the analysisType and reason), and
also requests allowed/blocked by the allow/deny URL lists.

Differential Revision: https://phabricator.services.mozilla.com/D252572
2025-06-18 22:38:18 +00:00
Greg Stoll 61133fcba9 Bug 1963385 part 2 - add connection attempts/failures telemetry for Content Analysis r=dlp-reviewers,handyman
Records connection attempts, retries, and failures (with nsresult).

This also adds a GetCreatingClientForTest() method so that tests can
call to create a client, then SpinEventLoopUntil() until
GetCreatingClientForTest() returns false, and after this point the
telemetry should be recorded.

Also moves some test code from TestContentAnalysis.cpp to
TestContentAnalysisUtils.h so it can be used in the new telemetry gtests.

Note that these new gtests start the agent every time it's needed - this
will be cleaned up in part 4.

Differential Revision: https://phabricator.services.mozilla.com/D252571
2025-06-18 22:38:15 +00:00
Greg Stoll 593bbb1f6e Bug 1963385 part 1 - add settings telemetry for Content Analysis r=dlp-reviewers,handyman
Records telemetry for the settings used with Content Analysis. Note
that there is no way in C++ to get the default value of a pref that was
set via an Enterprise Policy (with setAndLockPref()) because that method
actually sets the default value, so I had to modify some of my plans for
telemetry to gather. For example, I was going to record interception points
whose Enabled value differed from the default, but instead we record
any interception points whose Enabled value is false. (right now these
are equivalent, but Downloads will be default-off so this will change)

For the allow/deny URL lists I didn't want to record the actual URLs
on those lists, so we really do want to just record whether the values
are different from the default. I hard-coded the default into
ContentAnalysis.cpp, and we can rely on the JS test
test_ca_enterprise_config_with_default_prefs_telemetry() to start failing
if that changes.

Also adds a forceRecreateClientForTest() method to ContentAnalysis that
tests can use to force trying to connect to a client. (since this is when
we record the settings telemetry)

Differential Revision: https://phabricator.services.mozilla.com/D252570
2025-06-18 22:38:12 +00:00
Greg Stoll 49256f5d79 Bug 1936521 - set different errors for different ways GetURIForDropEvent() can fail r=dlp-reviewers,handyman
Differential Revision: https://phabricator.services.mozilla.com/D254253
2025-06-18 19:39:21 +00:00
Greg Stoll ea00cc6529 Bug 1965504 part 6 - add pref and enterprise policy for Content Analysis Downloads r=dlp-reviewers,handyman
Note that for backwards compatibility the pref to do Downloads
analysis is off by default.

Differential Revision: https://phabricator.services.mozilla.com/D251882
2025-06-16 20:32:37 +00:00
Greg Stoll 7808bc9d35 Bug 1965504 part 4.5 - make ContentAnalysisResponse implement nsIClassInfo r=Gijs
This means we don't have to QueryInterface() for it in JS.

Differential Revision: https://phabricator.services.mozilla.com/D253571
2025-06-16 20:32:28 +00:00
Greg Stoll 72cbffb62e Bug 1965504 part 3 - avoid assert on shutdown if user actions are in progress r=dlp-reviewers,handyman
This doesn't fix all the problems, but accessing mUserActionMap while
we're in the middle of shutdown is one way to hit an assert, so check
IsShutDown() first.

Differential Revision: https://phabricator.services.mozilla.com/D251879
2025-06-16 20:32:23 +00:00
Greg Stoll 429b6d4953 Bug 1965504 part 2 - make Content Analysis log SHA-256 digest in hex r=dlp-reviewers,handyman
Sadly, the demo agent doesn't do this and just logs the raw digest.

Differential Revision: https://phabricator.services.mozilla.com/D251878
2025-06-16 20:32:20 +00:00
Greg Stoll b3316f58d6 Bug 1965504 part 1 - add Download operation type and rename fileNameForDisplay r=dlp-reviewers,fluent-reviewers,bolsson,handyman
We only ever used operationDisplayString to represent a filename,
so go ahead and formalize that.

Differential Revision: https://phabricator.services.mozilla.com/D251877
2025-06-16 20:32:17 +00:00
Greg Stoll 107e1055b5 Bug 1961170 part 2 - add AnalyzeBatchContentRequest method r=dlp-reviewers,handyman
This adds a nsIContentAnalysisBatchResult interface which includes the
allowedFiles that the new method returns. On the C++ side I made the
existing ContentAnalysisActionResult class implement this interface
as well, but I'm not married to this; we could make a separate class
instead.

In practice I kind of doubt that a user on Windows could actually drag
some data that has some files and some non-files, but the code should
handle this case correctly. The non-files control whether the overall
result of the nsIContentAnalysisBatchResult is eAllow or eBlock, and
the files that are allowed will get put in allowedFiles.

Differential Revision: https://phabricator.services.mozilla.com/D248519
2025-05-21 17:33:15 +00:00
Greg Stoll 8ba9956d41 Bug 1961170 part 1 - add autoAcknowledge to CheckFilesInBatchMode() r=dlp-reviewers,win-reviewers,handyman
The new entry point analyzeBatchContentRequest() (added in a later part)
is going to want this parameter.

Differential Revision: https://phabricator.services.mozilla.com/D248518
2025-05-21 17:33:11 +00:00
Sylvestre Ledru 8ae54ea4f9 Bug 1519636 - Reformat recent changes to the Google coding style r=geckoview-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,nalexander,gstoll,tcampbell,janv,julienw
Updated with clang-format version 19.1.7 (taskcluster-DYvBxDZJRVqTi8E7pTSJAQ)

Differential Revision: https://phabricator.services.mozilla.com/D249880
2025-05-17 19:11:13 +00:00
Greg Stoll c2396a2055 Bug 1965230 - add test for DLP block dialog r=dlp-reviewers,handyman
Differential Revision: https://phabricator.services.mozilla.com/D248486
2025-05-15 20:56:27 +00:00
David P d0402dfe8c Bug 1961681: Shutdown the content analysis threadpool with a delay r=dlp-reviewers,gstoll
Causes the thread pool to abandon the thread at shutdown (instead
of joining it) so that it won't hold up shutdown if the connection to the
agent is still taking a long time (greater than 2 seconds) processing a
request.  See nsThreadPool::ShutdownWithTimeout.

Differential Revision: https://phabricator.services.mozilla.com/D246357
2025-04-24 18:35:51 +00:00
David P 6cb56ec699 Bug 1961681: Make content analysis agent communication runnables cancelable r=dlp-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D246356
2025-04-24 18:35:50 +00:00
David P 2ff239406e Bug 1959897: Cancel all parts of a folder check when the user presses cancel r=dlp-reviewers,gstoll
Since the cancel dialog is only associated with one user action ID, and a
folder check now uses different user action IDs for each file, user-cancel
needs to cancel all of the associated user action IDs.  (Other cancel
reasons will not want that behavior.)

This patch adds a set of these compound actions to the service.  Each entry
is the complete set of user action IDs that constitute the compound action.
The set is held until the compound action issues a response.

Differential Revision: https://phabricator.services.mozilla.com/D246160
2025-04-24 18:35:50 +00:00
Narcis Beleuzu 2c62587ed4 Backed out 3 changesets (bug 1959897, bug 1961681) for bc failure on browser_content_analysis_quit_confirmation_dialog.js . CLOSED TREE
Backed out changeset 467eb65531bb (bug 1961681)
Backed out changeset 8c31a7235349 (bug 1961681)
Backed out changeset 850588e929b6 (bug 1959897)
2025-04-24 01:58:57 +03:00
David P e74204e9c7 Bug 1961681: Shutdown the content analysis threadpool with a delay r=dlp-reviewers,gstoll
Causes the thread pool to abandon the thread at shutdown (instead
of joining it) so that it won't hold up shutdown if the connection to the
agent is still taking a long time (greater than 2 seconds) processing a
request.  See nsThreadPool::ShutdownWithTimeout.

Differential Revision: https://phabricator.services.mozilla.com/D246357
2025-04-23 20:49:08 +00:00
David P 30c11d5477 Bug 1961681: Make content analysis agent communication runnables cancelable r=dlp-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D246356
2025-04-23 20:49:08 +00:00
David P d32b0a6902 Bug 1959897: Cancel all parts of a folder check when the user presses cancel r=dlp-reviewers,gstoll
Since the cancel dialog is only associated with one user action ID, and a
folder check now uses different user action IDs for each file, user-cancel
needs to cancel all of the associated user action IDs.  (Other cancel
reasons will not want that behavior.)

This patch adds a set of these compound actions to the service.  Each entry
is the complete set of user action IDs that constitute the compound action.
The set is held until the compound action issues a response.

Differential Revision: https://phabricator.services.mozilla.com/D246160
2025-04-23 20:49:08 +00:00
David P 15c487f1ed Bug 1956629: Part 2 - Test that queued CA requests that are canceled are not sent to agent r=dlp-reviewers,gstoll
Since this feature affects old tests, this also adds a test-only field that
tests (especially old tests) can set to indicate that Gecko should skip the
feature.

Since the feature is contained to the agent threads, and those don't exist
for mocked CA, this is only relevant in gtests, where CA is not mocked.

Differential Revision: https://phabricator.services.mozilla.com/D243721
2025-04-07 18:04:17 +00:00
David P 517a230f7f Bug 1956629: Part 1 - Don't request scan from agent if user action was canceled r=dlp-reviewers,gstoll
The scans would take time to check with the DLP despite the request having
already been canceled/blocked and the relevant response to that having
already been sent.

Differential Revision: https://phabricator.services.mozilla.com/D243228
2025-04-07 18:04:17 +00:00
Greg Stoll 632836882d Bug 1957418 - don't send Content Analysis ack if we haven't gotten a response r=dlp-reviewers,handyman
Unfortunately this is a little hard to test because we'd have to wait
to see if two ACKs were sent. I did manually verify that this only sends
one ACK in the problem case, and all gtests pass.

Differential Revision: https://phabricator.services.mozilla.com/D244146
2025-04-02 19:04:04 +00:00