Commit graph

67 commits

Author SHA1 Message Date
Norisz Fay
7a9a35c44e Backed out changeset 416268cc8a36 (bug 1830725) for causing bc failures on browser_AttributionCode_telemetry.js 2023-11-29 00:56:57 +02:00
Michael Hughes
2128bde58f Bug 1830725: Synchronous nsWindowsPackageManager::GetCampaignId blocks main thread for many seconds r=bytesized,nrishel
Made GetCampaignId asynchronous to not block anything.

Differential Revision: https://phabricator.services.mozilla.com/D188520
2023-11-28 18:24:34 +00:00
Joel Maher
2cae29b76e Bug 1859869 - batch 12 - browser/* xpcshell .ini manifests to .toml. r=aryx,extension-reviewers,credential-management-reviewers,search-reviewers,sessionstore-reviewers,places-reviewers,issammani,Standard8,robwu,sclements
Differential Revision: https://phabricator.services.mozilla.com/D193996
2023-11-21 17:35:23 +00:00
Ben Hearsum
afabf171b4 Bug 1858545: put macOS attribution reporting behind a Nimbus flag r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D190986
2023-10-18 00:02:47 +00:00
Ben Hearsum
16fe634564 Bug 1816998: Replace macOS quarantine database-based attribution with extended attribute attribution r=nalexander
With extended attribute attribution using exactly the same attribution strings as Windows (eg: no URLs), this turns out to be quite straightforward. Once we've pulled in the attribution string from the extended attribute, the existing parsing, validation, etc. just works.

The only wrinkle is that the extended attributes may have nul bytes or tabs that we need to strip away. (Tabs may be present because we use them to pad the attribution area when we prepare the DMG for attribution. Nul bytes may be present because we overwrite the entire attribution before updating the attribution data.)

Differential Revision: https://phabricator.services.mozilla.com/D189258
2023-10-05 23:30:57 +00:00
Robin Steuber
497b34833f Bug 1815021 - Back out reading provenance data from AttributionCode r=nalexander
Backed out Bug 1815021's patch: https://hg.mozilla.org/mozilla-central/rev/9b8c31e9eb9f

Differential Revision: https://phabricator.services.mozilla.com/D189594
2023-10-03 23:40:25 +00:00
Robin Steuber
8281d2f582 Bug 1855604 - Back out support for sending provenance data via telemetry r=nalexander
Backed out Bug 1815023's patch: https://hg.mozilla.org/mozilla-central/rev/fc0d63d3404b

Depends on D189592

Differential Revision: https://phabricator.services.mozilla.com/D189593
2023-10-03 23:40:25 +00:00
Robin Steuber
2ac0a7eee5 Bug 1855604 - Back out putting provenance attribution in installation.first_seen r=nalexander
Backs out Bug 1821189's patch: https://hg.mozilla.org/mozilla-central/rev/c4f8098f81bb

Differential Revision: https://phabricator.services.mozilla.com/D189591
2023-10-03 23:40:24 +00:00
Mark Banner
130a655906 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner
8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
CanadaHonk
91709586ba Bug 1801379 - Migrate Sinon.jsm to an ES module r=extension-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,fxview-reviewers,devtools-reviewers,Standard8,nchevobbe,sclements,dimi,mconley,bytesized,robwu
Migrated `testing/modules/Sinon.sys.mjs` to an ES module.

`testing` should now be 100% ESM 🎉

Differential Revision: https://phabricator.services.mozilla.com/D173643
2023-03-29 07:34:10 +00:00
William Durand
86d264f943 Bug 1819997 - Allow dlsource in attribution data. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D173429
2023-03-28 19:41:36 +00:00
Robin Steuber
4be49e117e Bug 1821189 - Associate provenance attribution with installation.first_seen event r=nalexander
We can't add the provenance data to the `installation.first_seen` extra data because it is already at its maximum number of keys. So instead we will add the `installation.first_seen_prov_ext` event which will be sent at the same time as `installation.first_seen` and will contain provenance attribution data in its extras object.

Differential Revision: https://phabricator.services.mozilla.com/D172520
2023-03-14 18:08:16 +00:00
Robin Steuber
cf96a4611e Bug 1821406 - testProvenance calls should be awaited upon r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D172074
2023-03-09 17:28:37 +00:00
Robin Steuber
0a57d388ca Bug 1815023 - Add support for sending attribution provenance data via telemetry r=nalexander,chutten
Add a function that sets scalars to convey what kind of data is present in the :Zone.Identifier Alternate Data Stream. Also adds testing that the scalars get set correctly.

Does not actually call the function that sends the telemetry. This will be done in the next patch since we need to call it in some slightly different places than we usually would since we want to be sure it is included in the `new-profile` ping and in the ping with the `installation.first_seen` event.

Differential Revision: https://phabricator.services.mozilla.com/D171818
2023-03-08 22:25:07 +00:00
Robin Steuber
1f131fa5fb Bug 1815021 - Update AttributionCode.jsm to read provenance data r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D171817
2023-03-08 22:25:06 +00:00
elephanteatsapple
bfd805d38c Bug 1812141 - Convert JSMs in browser/components/attribution to ESMs. r=mconley,kpatenio,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D167730
2023-02-15 21:40:30 +00:00
Marian-Vasile Laza
f44882d7b1 Backed out changeset 0d0223fcdc02 (bug 1812141) for xpcshelll failures on test_ClientEnvironment.js. CLOSED TREE 2023-02-13 20:34:22 +02:00
elephanteatsapple
87ced737b9 Bug 1812141 - Convert JSMs in browser/components/attribution to ESMs. r=mconley,kpatenio,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D167730
2023-02-13 16:32:41 +00:00
Ben Hearsum
3e5bd87204 Bug 1807924: make attribution tests work against MSIX builds r=nalexander
Two notable things here:
- Small refactor of AttributionCode.jsm to make it more testable (allowing `getCampaignId` to be easily stubbed out)
- An ugly skip of one of the "invalid" attribution code tests -- for reasons noted in the comments. Ultimately, this points to maybe a refactor or larger change being needed, but I don't think it's worth blocking getting these tests on.

Differential Revision: https://phabricator.services.mozilla.com/D166688
2023-01-16 19:32:05 +00:00
Ben Hearsum
6c520ec6c8 Bug 1805919: disable tests that are currently failing against MSIX packages. r=jmaher,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165754
2023-01-11 14:45:03 +00:00
Mark Banner
2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Mark Banner
a7e93ca96e Bug 1782659 - Enable ESlint rule no-unused-vars on the global scope for browser/ xpcshell-tests. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D153433
2022-08-05 08:38:50 +00:00
Tooru Fujisawa
bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Ben Hearsum
e84c6b96a0 Bug 1766479: don't run Windows only attribution tests on Mac r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D144729
2022-04-26 19:20:13 +00:00
Ben Hearsum
443289cf0f Bug 1756209: send Windows Store Campaign ID as attribution code r=nalexander
Nearly all the complexity here is abstracted away in the previous patch, so this is quite straightforward other than the one oddity noted in the comments.

Differential Revision: https://phabricator.services.mozilla.com/D143112
2022-04-26 15:55:34 +00:00
Barret Rennie
c7594bbe50 Bug 1745356 - Remove osfile.jsm from browser/components/attribution r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D133840
2021-12-25 20:59:24 +00:00
Evgenia Kotovich
b7899c1c92 Bug 1733535 - Replace OS.File with IOUtils in the attribution code. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128715
2021-10-25 08:38:52 +00:00
Norisz Fay
b641c43be1 Backed out changeset d63aab4e0688 (bug 1733535) for causing mochitest failures on browser_AttributionCode_telemetry.js CLOSED TREE 2021-10-22 16:32:43 +03:00
Evgenia Kotovich
03e4d49965 Bug 1733535 - Replace OS.File with IOUtils in the attribution code. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128715
2021-10-22 11:57:44 +00:00
Kirk Steuber
6bf6521c69 Bug 1677497 - Add support for the attribution parameter: dltoken r=nalexander,Mardak
Differential Revision: https://phabricator.services.mozilla.com/D100969
2021-01-20 01:08:43 +00:00
Nick Alexander
de497caa38 Bug 1525076 - Part 4: Cache attribution code on macOS. r=mixedpuppy
Querying the macOS system quarantine database is relatively slow, so
we'd like to do it only once.  This is relevant because the Telemetry
subsystem causes the attribution data to be fetched relatively early
during startup.  By caching, we accept additional disk activity but
don't have to invoke an external process, query a database, etc.

We must make BROWSER_ATTRIBUTION_ERRORS histogram apply to macOS as
well as Windows.  We add error codes to capture macOS-specific
detalis.  And we push this out to a later cycle, since there's no
reason to revisit this immediately.

Differential Revision: https://phabricator.services.mozilla.com/D92695
2020-10-11 18:20:11 +00:00
Nick Alexander
05efc87784 Bug 1525076 - Part 3: Add method to serialize attribution data. r=mixedpuppy
On Windows, we parse the attribution data as if it was the
`URL.search` parameter.  On macOS, we parse a URL slightly
differently: we parse it like `URL.searchParams` and we deduplicate
parameters.

For caching on macOS we need to serialize the parsed data.  We could
use either approach but we elect to write the code serialized as it
would be on Windows, since that is the one that is getting actively
tested in the wild.

Differential Revision: https://phabricator.services.mozilla.com/D92694
2020-10-11 18:19:22 +00:00
Nick Alexander
9df69a9722 Bug 1525076 - Part 2: Add AttributionCode.writeAttributionFile. r=mixedpuppy
The next step is to have the cached attribution file location vary
depending on the platform, and to have the tests run on additional
platforms.

Differential Revision: https://phabricator.services.mozilla.com/D84264
2020-10-11 18:19:04 +00:00
Nick Alexander
4c713eeeaf Bug 1525076 - Part 1: Fix macOS native getReferrerUrl by invoking system sqlite binary (from JS). r=mixedpuppy
The issue this is addresses is that
[`CFURLCopyResourcePropertyForKey`](https://searchfox.org/mozilla-central/rev/ea7f70dac1c5fd18400f6d2a92679777d4b21492/xpcom/io/CocoaFileUtils.mm#212)
does not return quarantine data when launched as a GUI App.  What
happens is that launching via the GUI requires the user to override
GateKeeper by going to Security & Privacy > Open Anyway.  Doing that
updates the GateKeeper flags, and then the macOS API denies access:
once the GK flags reach some state, quarantine information is not
returned.  This is not documented (as far as I can see) but moons ago,
[somebody else on the internet witnessed the same
thing](https://cocoa-dev.apple.narkive.com/kkYeAC8o/is-it-possible-to-read-your-own-quarantine-info-after-launch).

To work around, we run the system SQLite binary, to fish the relevant
information out of the per-user quarantine database.  (SQLite is
installed by default on all relevant macOS versions.)

The most significant security concern I see is whether we can trust
this binary (in /usr/bin/sqlite3). Some discussion within the
Install/Update team suggested that an attacker who could corrupt or
modify that binary already had write access to the disk, which is an
attack vector equal to a totally compromised Firefox. If we determine
that we can't use the system SQLite binary, then we could use
Firefox's compiled copy of SQLite, but we might see versioning
issues. The system SQLite binary feels more robust.

This is implemented as a JS component for convenience, mostly: there
is no API for capturing output from `nsIProcess`.  It would be
possible to maintain the existing XPCOM contract by renaming the
existing contract and adding a contract with a JS implementation that
passes through to the renamed implementation, but it doesn't seem
worth the effort.

In the next commits, we will generalize the existing caching mechanism
form Windows to also apply to macOS. This is mostly a performance
optimization, so that we sniff a single well-known location rather
than launching a process at each startup, although there is a
correctness argument here as well, since the quarantine database is
dynamic and the attribution URL could expire.

Differential Revision: https://phabricator.services.mozilla.com/D92693
2020-10-11 18:18:36 +00:00
Nick Alexander
ec7bc15264 Bug 1525076 - Part 0: Test more scenarios on macOS; handle URI component encoding. r=mixedpuppy
The existing code handles Windows and macOS quite differently.  On
macOS, the tests were not as comprehensive; this patch brings them
level and makes the form of the attribution data uniform on Windows
and macOS.  In particular, attribution data fields will now be URI
coded, just as they are on Windows.

This will allow us to re-use the parsing machinery we have on Windows
when we cache attribution codes on macOS.

Differential Revision: https://phabricator.services.mozilla.com/D92692
2020-10-11 18:18:11 +00:00
Razvan Maries
d5e4596a8f Backed out 6 changesets (bug 1525076) for perma failures on browser_startup_mainthreadio.js. CLOSED TREE
Backed out changeset a425e504ae7e (bug 1525076)
Backed out changeset 5163df5430c1 (bug 1525076)
Backed out changeset 4313cfb9dfcb (bug 1525076)
Backed out changeset 9178ebc95da2 (bug 1525076)
Backed out changeset 7bde7f6ccbd8 (bug 1525076)
Backed out changeset 6c2c2e07b95f (bug 1525076)
2020-10-09 22:51:36 +03:00
Nick Alexander
0c64a008ae Bug 1525076 - Part 4: Cache attribution code on macOS. r=mixedpuppy
Querying the macOS system quarantine database is relatively slow, so
we'd like to do it only once.  This is relevant because the Telemetry
subsystem causes the attribution data to be fetched relatively early
during startup.  By caching, we accept additional disk activity but
don't have to invoke an external process, query a database, etc.

We must make BROWSER_ATTRIBUTION_ERRORS histogram apply to macOS as
well as Windows.  We add error codes to capture macOS-specific
detalis.  And we push this out to a later cycle, since there's no
reason to revisit this immediately.

Differential Revision: https://phabricator.services.mozilla.com/D92695
2020-10-09 17:28:51 +00:00
Nick Alexander
70222a9a39 Bug 1525076 - Part 3: Add method to serialize attribution data. r=mixedpuppy
On Windows, we parse the attribution data as if it was the
`URL.search` parameter.  On macOS, we parse a URL slightly
differently: we parse it like `URL.searchParams` and we deduplicate
parameters.

For caching on macOS we need to serialize the parsed data.  We could
use either approach but we elect to write the code serialized as it
would be on Windows, since that is the one that is getting actively
tested in the wild.

Differential Revision: https://phabricator.services.mozilla.com/D92694
2020-10-09 17:28:48 +00:00
Nick Alexander
b436e5cb98 Bug 1525076 - Part 2: Add AttributionCode.writeAttributionFile. r=mixedpuppy
The next step is to have the cached attribution file location vary
depending on the platform, and to have the tests run on additional
platforms.

Differential Revision: https://phabricator.services.mozilla.com/D84264
2020-10-09 17:28:46 +00:00
Nick Alexander
95284b4d0f Bug 1525076 - Part 1: Fix macOS native getReferrerUrl by invoking system sqlite binary (from JS). r=mixedpuppy
The issue this is addresses is that
[`CFURLCopyResourcePropertyForKey`](https://searchfox.org/mozilla-central/rev/ea7f70dac1c5fd18400f6d2a92679777d4b21492/xpcom/io/CocoaFileUtils.mm#212)
does not return quarantine data when launched as a GUI App.  What
happens is that launching via the GUI requires the user to override
GateKeeper by going to Security & Privacy > Open Anyway.  Doing that
updates the GateKeeper flags, and then the macOS API denies access:
once the GK flags reach some state, quarantine information is not
returned.  This is not documented (as far as I can see) but moons ago,
[somebody else on the internet witnessed the same
thing](https://cocoa-dev.apple.narkive.com/kkYeAC8o/is-it-possible-to-read-your-own-quarantine-info-after-launch).

To work around, we run the system SQLite binary, to fish the relevant
information out of the per-user quarantine database.  (SQLite is
installed by default on all relevant macOS versions.)

The most significant security concern I see is whether we can trust
this binary (in /usr/bin/sqlite3). Some discussion within the
Install/Update team suggested that an attacker who could corrupt or
modify that binary already had write access to the disk, which is an
attack vector equal to a totally compromised Firefox. If we determine
that we can't use the system SQLite binary, then we could use
Firefox's compiled copy of SQLite, but we might see versioning
issues. The system SQLite binary feels more robust.

This is implemented as a JS component for convenience, mostly: there
is no API for capturing output from `nsIProcess`.  It would be
possible to maintain the existing XPCOM contract by renaming the
existing contract and adding a contract with a JS implementation that
passes through to the renamed implementation, but it doesn't seem
worth the effort.

In the next commits, we will generalize the existing caching mechanism
form Windows to also apply to macOS. This is mostly a performance
optimization, so that we sniff a single well-known location rather
than launching a process at each startup, although there is a
correctness argument here as well, since the quarantine database is
dynamic and the attribution URL could expire.

Differential Revision: https://phabricator.services.mozilla.com/D92693
2020-10-09 17:27:13 +00:00
Nick Alexander
ba4da7e71e Bug 1525076 - Part 0: Test more scenarios on macOS; handle URI component encoding. r=mixedpuppy
The existing code handles Windows and macOS quite differently.  On
macOS, the tests were not as comprehensive; this patch brings them
level and makes the form of the attribution data uniform on Windows
and macOS.  In particular, attribution data fields will now be URI
coded, just as they are on Windows.

This will allow us to re-use the parsing machinery we have on Windows
when we cache attribution codes on macOS.

Differential Revision: https://phabricator.services.mozilla.com/D92692
2020-10-09 17:26:38 +00:00
Razvan Maries
9c16898a12 Backed out 6 changesets (bug 1525076) for ES Lint failure. CLOSED TREE
Backed out changeset 912fcc3cb274 (bug 1525076)
Backed out changeset 690d730341c6 (bug 1525076)
Backed out changeset 5dd08176812c (bug 1525076)
Backed out changeset 963c8d33d779 (bug 1525076)
Backed out changeset f7d26b270884 (bug 1525076)
Backed out changeset 95fd52531439 (bug 1525076)
2020-10-09 20:17:23 +03:00
Nick Alexander
089cc31d0c Bug 1525076 - Part 4: Cache attribution code on macOS. r=mixedpuppy
Querying the macOS system quarantine database is relatively slow, so
we'd like to do it only once.  This is relevant because the Telemetry
subsystem causes the attribution data to be fetched relatively early
during startup.  By caching, we accept additional disk activity but
don't have to invoke an external process, query a database, etc.

We must make BROWSER_ATTRIBUTION_ERRORS histogram apply to macOS as
well as Windows.  We add error codes to capture macOS-specific
detalis.  And we push this out to a later cycle, since there's no
reason to revisit this immediately.

Differential Revision: https://phabricator.services.mozilla.com/D92695
2020-10-09 16:52:26 +00:00
Nick Alexander
da98570ac5 Bug 1525076 - Part 3: Add method to serialize attribution data. r=mixedpuppy
On Windows, we parse the attribution data as if it was the
`URL.search` parameter.  On macOS, we parse a URL slightly
differently: we parse it like `URL.searchParams` and we deduplicate
parameters.

For caching on macOS we need to serialize the parsed data.  We could
use either approach but we elect to write the code serialized as it
would be on Windows, since that is the one that is getting actively
tested in the wild.

Differential Revision: https://phabricator.services.mozilla.com/D92694
2020-10-09 16:51:48 +00:00
Nick Alexander
bdf23a1f96 Bug 1525076 - Part 2: Add AttributionCode.writeAttributionFile. r=mixedpuppy
The next step is to have the cached attribution file location vary
depending on the platform, and to have the tests run on additional
platforms.

Differential Revision: https://phabricator.services.mozilla.com/D84264
2020-10-09 16:51:41 +00:00
Nick Alexander
68734ef79d Bug 1525076 - Part 1: Fix macOS native getReferrerUrl by invoking system sqlite binary (from JS). r=mixedpuppy
The issue this is addresses is that
[`CFURLCopyResourcePropertyForKey`](https://searchfox.org/mozilla-central/rev/ea7f70dac1c5fd18400f6d2a92679777d4b21492/xpcom/io/CocoaFileUtils.mm#212)
does not return quarantine data when launched as a GUI App.  What
happens is that launching via the GUI requires the user to override
GateKeeper by going to Security & Privacy > Open Anyway.  Doing that
updates the GateKeeper flags, and then the macOS API denies access:
once the GK flags reach some state, quarantine information is not
returned.  This is not documented (as far as I can see) but moons ago,
[somebody else on the internet witnessed the same
thing](https://cocoa-dev.apple.narkive.com/kkYeAC8o/is-it-possible-to-read-your-own-quarantine-info-after-launch).

To work around, we run the system SQLite binary, to fish the relevant
information out of the per-user quarantine database.  (SQLite is
installed by default on all relevant macOS versions.)

The most significant security concern I see is whether we can trust
this binary (in /usr/bin/sqlite3). Some discussion within the
Install/Update team suggested that an attacker who could corrupt or
modify that binary already had write access to the disk, which is an
attack vector equal to a totally compromised Firefox. If we determine
that we can't use the system SQLite binary, then we could use
Firefox's compiled copy of SQLite, but we might see versioning
issues. The system SQLite binary feels more robust.

This is implemented as a JS component for convenience, mostly: there
is no API for capturing output from `nsIProcess`.  It would be
possible to maintain the existing XPCOM contract by renaming the
existing contract and adding a contract with a JS implementation that
passes through to the renamed implementation, but it doesn't seem
worth the effort.

In the next commits, we will generalize the existing caching mechanism
form Windows to also apply to macOS. This is mostly a performance
optimization, so that we sniff a single well-known location rather
than launching a process at each startup, although there is a
correctness argument here as well, since the quarantine database is
dynamic and the attribution URL could expire.

Differential Revision: https://phabricator.services.mozilla.com/D92693
2020-10-09 16:51:39 +00:00
Nick Alexander
d205cdd673 Bug 1525076 - Part 0: Test more scenarios on macOS; handle URI component encoding. r=mixedpuppy
The existing code handles Windows and macOS quite differently.  On
macOS, the tests were not as comprehensive; this patch brings them
level and makes the form of the attribution data uniform on Windows
and macOS.  In particular, attribution data fields will now be URI
coded, just as they are on Windows.

This will allow us to re-use the parsing machinery we have on Windows
when we cache attribution codes on macOS.

Differential Revision: https://phabricator.services.mozilla.com/D92692
2020-10-09 16:51:36 +00:00
Cosmin Sabou
bc9d9e13d4 Backed out 6 changesets (bug 1525076) for OSX xpcshell failures on test_ASRouterTargeting_attribution. CLOSED TREE
Backed out changeset 25fd5f2e276e (bug 1525076)
Backed out changeset 4f2c3fe9ee78 (bug 1525076)
Backed out changeset e7e05723ceae (bug 1525076)
Backed out changeset d0c81fd932c7 (bug 1525076)
Backed out changeset c1629391c635 (bug 1525076)
Backed out changeset e6b09ef2a26c (bug 1525076)
2020-10-09 07:39:32 +03:00
Nick Alexander
52b2239c7b Bug 1525076 - Part 4: Cache attribution code on macOS. r=mixedpuppy
Querying the macOS system quarantine database is relatively slow, so
we'd like to do it only once.  This is relevant because the Telemetry
subsystem causes the attribution data to be fetched relatively early
during startup.  By caching, we accept additional disk activity but
don't have to invoke an external process, query a database, etc.

We must make BROWSER_ATTRIBUTION_ERRORS histogram apply to macOS as
well as Windows.  We add error codes to capture macOS-specific
detalis.  And we push this out to a later cycle, since there's no
reason to revisit this immediately.

Differential Revision: https://phabricator.services.mozilla.com/D92695
2020-10-08 21:54:16 +00:00