Backed out changeset 05f9d3f41752 (bug 1429885) because it landed on wrong branch. a=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 15 Jan 2018 12:18:23 +0200
changeset 450750 faecd3820cf4edcf6f94a329f4ae6962dfb64d49
parent 450735 05f9d3f417524ae6a4b8438a3c29b21d014e0da6
child 450751 09bab9dac2557fa568c7072299df0527f073043e
push id8539
push userarchaeopteryx@coole-files.de
push dateMon, 15 Jan 2018 10:33:28 +0000
treeherdermozilla-beta@15129163c0ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1429885
milestone59.0
backs out05f9d3f417524ae6a4b8438a3c29b21d014e0da6
Backed out changeset 05f9d3f41752 (bug 1429885) because it landed on wrong branch. a=backout
toolkit/components/resistfingerprinting/nsRFPService.cpp
toolkit/components/resistfingerprinting/nsRFPService.h
--- a/toolkit/components/resistfingerprinting/nsRFPService.cpp
+++ b/toolkit/components/resistfingerprinting/nsRFPService.cpp
@@ -73,31 +73,16 @@ nsRFPService::GetOrCreate()
     ClearOnShutdown(&sRFPService);
     sInitialized = true;
   }
 
   return sRFPService;
 }
 
 /* static */
-bool
-nsRFPService::IsResistFingerprintingEnabled()
-{
-  return sPrivacyResistFingerprinting;
-}
-
-/* static */
-bool
-nsRFPService::IsTimerPrecisionReductionEnabled()
-{
-  return (sPrivacyTimerPrecisionReduction || IsResistFingerprintingEnabled()) &&
-         sResolutionUSec != 0;
-}
-
-/* static */
 double
 nsRFPService::ReduceTimePrecisionAsMSecs(double aTime)
 {
   if (!IsTimerPrecisionReductionEnabled()) {
     return aTime;
   }
   const double resolutionMSec = sResolutionUSec / 1000.0;
   return floor(aTime / resolutionMSec) * resolutionMSec;
--- a/toolkit/components/resistfingerprinting/nsRFPService.h
+++ b/toolkit/components/resistfingerprinting/nsRFPService.h
@@ -48,18 +48,24 @@ namespace mozilla {
 
 class nsRFPService final : public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   static nsRFPService* GetOrCreate();
-  static bool IsResistFingerprintingEnabled();
-  static bool IsTimerPrecisionReductionEnabled();
+  static bool IsResistFingerprintingEnabled()
+  {
+    return sPrivacyResistFingerprinting;
+  }
+  static bool IsTimerPrecisionReductionEnabled()
+  {
+    return sPrivacyTimerPrecisionReduction || IsResistFingerprintingEnabled();
+  }
 
   // The following Reduce methods can be called off main thread.
   static double ReduceTimePrecisionAsMSecs(double aTime);
   static double ReduceTimePrecisionAsUSecs(double aTime);
   static double ReduceTimePrecisionAsSecs(double aTime);
 
   // This method calculates the video resolution (i.e. height x width) based
   // on the video quality (480p, 720p, etc).