An empty attribution string is a different case from one that exists that cannot be read (they generally point towards different potential causes in our infrastructure). We should send them as distinct errors.
Differential Revision: https://phabricator.services.mozilla.com/D199558
This is mostly removing code and tests related to reading/writing the cache file on macOS and updating of tests. Aside from that, the most notable part is the change to `setAttributionString` to automatically prepend `__MOZCUSTOM__` when writing an attribution code. This is mostly done to make things simpler and cleaner in the majority of the tests, but seeing as `getAttributionString` is also aware of it, it seems like a generally nicer way to do this.
Differential Revision: https://phabricator.services.mozilla.com/D197204
This function has been difficult to read for awhile. This patch cleans it up in preparation to adjust it for the removal of the cache file on macOS.
Differential Revision: https://phabricator.services.mozilla.com/D197203
This is mostly removing code and tests related to reading/writing the cache file on macOS and updating of tests. Aside from that, the most notable part is the change to `setAttributionString` to automatically prepend `__MOZCUSTOM__` when writing an attribution code. This is mostly done to make things simpler and cleaner in the majority of the tests, but seeing as `getAttributionString` is also aware of it, it seems like a generally nicer way to do this.
Differential Revision: https://phabricator.services.mozilla.com/D197204
This function has been difficult to read for awhile. This patch cleans it up in preparation to adjust it for the removal of the cache file on macOS.
Differential Revision: https://phabricator.services.mozilla.com/D197203
The pref is being kept for now, to make it easy for QA to verify dynamic attribution when it is ready.
Depends on D192628
Differential Revision: https://phabricator.services.mozilla.com/D193799
While investigating why initial macOS attribution data had a lower attribution rate than expected I realized that one reason why this may be the case is because we're using the same file as a cache for it. This means that even if a user has paved over with a fresh install, we will pick up the previous attribution data (even if it was null).
While doing this, I think we should also accommodate having separate attribution data per channel, which should keep the data cleaner. Release, Beta, and ESR use `Firefox.app`, which makes the likelyhood of a paveover with a different channel reasonably high.
Differential Revision: https://phabricator.services.mozilla.com/D192628
While investigating why initial macOS attribution data had a lower attribution rate than expected I realized that one reason why this may be the case is because we're using the same file as a cache for it. This means that even if a user has paved over with a fresh install, we will pick up the previous attribution data (even if it was null).
While doing this, I think we should also accommodate having separate attribution data per channel, which should keep the data cleaner. Release, Beta, and ESR use `Firefox.app`, which makes the likelyhood of a paveover with a different channel reasonably high.
Differential Revision: https://phabricator.services.mozilla.com/D192628
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
Firefox versions >= 116 only support macOS >= 10.15. Mojave is macOS 10.14. Catalina is macOS 10.15.
Also stop including unused "nsCocoaFeatures.h" in files with no macOS version checks.
Differential Revision: https://phabricator.services.mozilla.com/D185505
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
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
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
This is only done by the Return-to-AMO flow, which is not supported in MSIX anyways.
Also, disable the RTAMO test for MSIX builds while we're here.
Differential Revision: https://phabricator.services.mozilla.com/D164666
This is only done by the Return-to-AMO flow, which is not supported in MSIX anyways.
Also, disable the RTAMO test for MSIX builds while we're here.
Differential Revision: https://phabricator.services.mozilla.com/D164666