forked from mirrors/gecko-dev
80 lines
2.2 KiB
Text
80 lines
2.2 KiB
Text
/* 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);
|
|
};
|