Bug 1429885 Support a rounding value of 0 for reduceTimerPrecision r=bkelly,timhuang

MozReview-Commit-ID: F96EUfXgK9F

--HG--
extra : rebase_source : a07dc479dc895cd06fb59902d1eacaeaec30266b
This commit is contained in:
Tom Ritter 2018-01-11 14:25:14 -06:00
Родитель 736c2b47a1
Коммит 66fa50f4d6
2 изменённых файлов: 17 добавлений и 8 удалений

Просмотреть файл

@ -77,6 +77,21 @@ nsRFPService::GetOrCreate()
return sRFPService;
}
/* static */
bool
nsRFPService::IsResistFingerprintingEnabled()
{
return sPrivacyResistFingerprinting;
}
/* static */
bool
nsRFPService::IsTimerPrecisionReductionEnabled()
{
return (sPrivacyTimerPrecisionReduction || IsResistFingerprintingEnabled()) &&
sResolutionUSec != 0;
}
/* static */
double
nsRFPService::ReduceTimePrecisionAsMSecs(double aTime)

Просмотреть файл

@ -53,14 +53,8 @@ public:
NS_DECL_NSIOBSERVER
static nsRFPService* GetOrCreate();
static bool IsResistFingerprintingEnabled()
{
return sPrivacyResistFingerprinting;
}
static bool IsTimerPrecisionReductionEnabled()
{
return sPrivacyTimerPrecisionReduction || IsResistFingerprintingEnabled();
}
static bool IsResistFingerprintingEnabled();
static bool IsTimerPrecisionReductionEnabled();
// The following Reduce methods can be called off main thread.
static double ReduceTimePrecisionAsMSecs(double aTime);