1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
#include "nsIFingerprintingWebCompatService.idl"
interface nsIPrincipal;
interface nsIChannel;
/**
* The singleton serivce which handles fingerprinting protection stuffs.
*/
[scriptable, builtinclass, uuid(20093b2e-d5d5-4ce0-8355-96b8d2dc7ff5)]
interface nsIRFPService : nsISupports
{
/**
* Set the fingerprinting overrides.
*
* @param aOverrides
* An array of fingerprinting overrides.
*/
void setFingerprintingOverrides(in Array<nsIFingerprintingOverride> aOverrides);
/**
* Get the fingerprinting overrides of the given scope. This is for testing
* purpose.
*
* @param aScope
* The scope of the fingerprinting override.
* @return The RFPTarget flags for the fingerprinting overrides of the given
* scope. 0 if the overridden scope doesn't exist.
*
*/
uint64_t getFingerprintingOverrides(in ACString aDomainKey);
/**
* Clean all overrides. This is for testing purpose.
*/
void cleanAllOverrides();
/**
* The bitfield of the default enabled RFP Targets.
*/
readonly attribute uint64_t enabledFingerprintingProtections;
/**
* Clean all fingerprinting randomization keys.
*/
void cleanAllRandomKeys();
/**
* Clean the fingerprinting randomization key by the given principal.
*/
void cleanRandomKeyByPrincipal(in nsIPrincipal aPrincipal);
/**
* Clean the fingerprinting randomization key by the given domain.
*/
void cleanRandomKeyByDomain(in ACString aDomain);
/**
* Clean the fingerprinting randomization key by the given host and
* OriginAttributesPattern.
*/
void cleanRandomKeyByHost(in ACString aHost,
in AString aPattern);
/**
* Clean the fingerprinting randomization key by the given
* OriginAttributesPattern.
*/
void cleanRandomKeyByOriginAttributesPattern(in AString aPattern);
/**
* Test function for generating and return the fingerprinting randomization
* key for the given channel.
*/
Array<uint8_t> testGenerateRandomKey(in nsIChannel aChannel);
};
|