Bug 1455723 - Firefox59 does not properly honor cache size set in autoconfig files, r=mayhemer
authorMichal Novotny <michal.novotny>
Mon, 14 Jan 2019 06:47:00 +0200
changeset 513668 780eec2d27c312f824dfa5759d5e4659b72cb46a
parent 513667 18815665f545ee79da2d71532e9054edd42d9eda
child 513669 5f7e5c3ca87dcfdea30bfd83c968e656a0022d2f
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1455723
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1455723 - Firefox59 does not properly honor cache size set in autoconfig files, r=mayhemer We keep old cache code in the tree only because of offline cache. We no longer allow using old disk or memory cache. This patch removes all preferences manipulation from old cache code that isn't used by offline cache. It removes also some related code (e.g. everything smart size related, unused defines etc.), but the goal wasn't to remove all unused code from the old cache.
mobile/android/app/mobile.js
modules/libpref/init/all.js
netwerk/cache/nsCacheService.cpp
netwerk/cache/nsCacheService.h
netwerk/cache/nsDiskCacheDevice.cpp
testing/profiles/perf/user.js
testing/talos/talos/unittests/test_talosconfig_browser_config.json
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -67,17 +67,16 @@ pref("ui.scrollbarFadeDuration", 0);
 /* turn off the caret blink after 10 cycles */
 pref("ui.caretBlinkCount", 10);
 
 /* cache prefs */
 pref("browser.cache.disk.enable", true);
 pref("browser.cache.disk.capacity", 20480); // kilobytes
 pref("browser.cache.disk.max_entry_size", 4096); // kilobytes
 pref("browser.cache.disk.smart_size.enabled", true);
-pref("browser.cache.disk.smart_size.first_run", true);
 
 pref("browser.cache.memory.enable", true);
 pref("browser.cache.memory.capacity", 1024); // kilobytes
 
 pref("browser.cache.memory_limit", 5120); // 5 MB
 
 /* image cache prefs */
 pref("image.cache.size", 1048576); // bytes
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -24,22 +24,18 @@ pref("general.useragent.site_specific_ov
 pref("general.config.obscure_value", 13); // for MCD .cfg files
 
 pref("general.warnOnAboutConfig", true);
 
 // maximum number of dated backups to keep at any time
 pref("browser.bookmarks.max_backups",       5);
 
 pref("browser.cache.disk.enable",           true);
-// Is this the first-time smartsizing has been introduced?
-pref("browser.cache.disk.smart_size.first_run", true);
 // Does the user want smart-sizing?
 pref("browser.cache.disk.smart_size.enabled", true);
-// Which max value should we use for smart-sizing?
-pref("browser.cache.disk.smart_size.use_old_max", true);
 // Size (in KB) explicitly set by the user. Used when smart_size.enabled == false
 pref("browser.cache.disk.capacity",         256000);
 // When smartsizing is disabled we could potentially fill all disk space by
 // cache data when the disk capacity is not set correctly. To avoid that we
 // check the free space every time we write some data to the cache. The free
 // space is checked against two limits. Once the soft limit is reached we start
 // evicting the least useful entries, when we reach the hard limit writing to
 // the entry fails.
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
@@ -46,113 +46,65 @@
 #include <algorithm>
 
 using namespace mozilla;
 using namespace mozilla::net;
 
 /******************************************************************************
  * nsCacheProfilePrefObserver
  *****************************************************************************/
-#define DISK_CACHE_ENABLE_PREF "browser.cache.disk.enable"
-#define DISK_CACHE_DIR_PREF "browser.cache.disk.parent_directory"
-#define DISK_CACHE_SMART_SIZE_FIRST_RUN_PREF \
-  "browser.cache.disk.smart_size.first_run"
-#define DISK_CACHE_SMART_SIZE_ENABLED_PREF \
-  "browser.cache.disk.smart_size.enabled"
-#define DISK_CACHE_SMART_SIZE_PREF "browser.cache.disk.smart_size_cached_value"
-#define DISK_CACHE_CAPACITY_PREF "browser.cache.disk.capacity"
-#define DISK_CACHE_MAX_ENTRY_SIZE_PREF "browser.cache.disk.max_entry_size"
-#define DISK_CACHE_CAPACITY 256000
-
-#define DISK_CACHE_USE_OLD_MAX_SMART_SIZE_PREF \
-  "browser.cache.disk.smart_size.use_old_max"
-
 #define OFFLINE_CACHE_ENABLE_PREF "browser.cache.offline.enable"
 #define OFFLINE_CACHE_DIR_PREF "browser.cache.offline.parent_directory"
 #define OFFLINE_CACHE_CAPACITY_PREF "browser.cache.offline.capacity"
 #define OFFLINE_CACHE_CAPACITY 512000
 
-#define MEMORY_CACHE_ENABLE_PREF "browser.cache.memory.enable"
-#define MEMORY_CACHE_CAPACITY_PREF "browser.cache.memory.capacity"
-#define MEMORY_CACHE_MAX_ENTRY_SIZE_PREF "browser.cache.memory.max_entry_size"
-
-#define CACHE_COMPRESSION_LEVEL_PREF "browser.cache.compression_level"
 #define CACHE_COMPRESSION_LEVEL 1
 
-#define SANITIZE_ON_SHUTDOWN_PREF "privacy.sanitize.sanitizeOnShutdown"
-#define CLEAR_ON_SHUTDOWN_PREF "privacy.clearOnShutdown.cache"
-
 static const char *observerList[] = {
     "profile-before-change",        "profile-do-change",
     NS_XPCOM_SHUTDOWN_OBSERVER_ID,  "last-pb-context-exited",
     "suspend_process_notification", "resume_process_notification"};
 
 static const char *prefList[] = {
-    DISK_CACHE_ENABLE_PREF,         DISK_CACHE_SMART_SIZE_ENABLED_PREF,
-    DISK_CACHE_CAPACITY_PREF,       DISK_CACHE_DIR_PREF,
-    DISK_CACHE_MAX_ENTRY_SIZE_PREF, DISK_CACHE_USE_OLD_MAX_SMART_SIZE_PREF,
     OFFLINE_CACHE_ENABLE_PREF,      OFFLINE_CACHE_CAPACITY_PREF,
-    OFFLINE_CACHE_DIR_PREF,         MEMORY_CACHE_ENABLE_PREF,
-    MEMORY_CACHE_CAPACITY_PREF,     MEMORY_CACHE_MAX_ENTRY_SIZE_PREF,
-    CACHE_COMPRESSION_LEVEL_PREF,   SANITIZE_ON_SHUTDOWN_PREF,
-    CLEAR_ON_SHUTDOWN_PREF,         nullptr,
+    OFFLINE_CACHE_DIR_PREF,         nullptr,
 };
 
-// Cache sizes, in KB
-const int32_t DEFAULT_CACHE_SIZE = 250 * 1024;  // 250 MB
-#ifdef ANDROID
-const int32_t MAX_CACHE_SIZE = 200 * 1024;      // 200 MB
-const int32_t OLD_MAX_CACHE_SIZE = 200 * 1024;  // 200 MB
-#else
-const int32_t MAX_CACHE_SIZE = 350 * 1024;       // 350 MB
-const int32_t OLD_MAX_CACHE_SIZE = 1024 * 1024;  //   1 GB
-#endif
-// Default cache size was 50 MB for many years until FF 4:
-const int32_t PRE_GECKO_2_0_DEFAULT_CACHE_SIZE = 50 * 1024;
-
 class nsCacheProfilePrefObserver : public nsIObserver {
   virtual ~nsCacheProfilePrefObserver() = default;
 
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   nsCacheProfilePrefObserver()
       : mHaveProfile(false),
         mDiskCacheEnabled(false),
         mDiskCacheCapacity(0),
         mDiskCacheMaxEntrySize(-1)  // -1 means "no limit"
         ,
-        mSmartSizeEnabled(false),
-        mShouldUseOldMaxSmartSize(false),
         mOfflineCacheEnabled(false),
         mOfflineCacheCapacity(0),
-        mMemoryCacheEnabled(true),
+        mMemoryCacheEnabled(false),
         mMemoryCacheCapacity(-1),
         mMemoryCacheMaxEntrySize(-1)  // -1 means "no limit"
         ,
         mCacheCompressionLevel(CACHE_COMPRESSION_LEVEL),
         mSanitizeOnShutdown(false),
         mClearCacheOnShutdown(false) {}
 
   nsresult Install();
   void Remove();
   nsresult ReadPrefs(nsIPrefBranch *branch);
 
   bool DiskCacheEnabled();
   int32_t DiskCacheCapacity() { return mDiskCacheCapacity; }
   void SetDiskCacheCapacity(int32_t);
   int32_t DiskCacheMaxEntrySize() { return mDiskCacheMaxEntrySize; }
   nsIFile *DiskCacheParentDirectory() { return mDiskCacheParentDirectory; }
-  bool SmartSizeEnabled() { return mSmartSizeEnabled; }
-
-  bool ShouldUseOldMaxSmartSize() { return mShouldUseOldMaxSmartSize; }
-  void SetUseNewMaxSmartSize(bool useNew) {
-    mShouldUseOldMaxSmartSize = !useNew;
-  }
 
   bool OfflineCacheEnabled();
   int32_t OfflineCacheCapacity() { return mOfflineCacheCapacity; }
   nsIFile *OfflineCacheParentDirectory() {
     return mOfflineCacheParentDirectory;
   }
 
   bool MemoryCacheEnabled();
@@ -160,34 +112,25 @@ class nsCacheProfilePrefObserver : publi
   int32_t MemoryCacheMaxEntrySize() { return mMemoryCacheMaxEntrySize; }
 
   int32_t CacheCompressionLevel();
 
   bool SanitizeAtShutdown() {
     return mSanitizeOnShutdown && mClearCacheOnShutdown;
   }
 
-  static uint32_t GetSmartCacheSize(const nsAString &cachePath,
-                                    uint32_t currentSize,
-                                    bool shouldUseOldMaxSmartSize);
-
-  bool PermittedToSmartSize(nsIPrefBranch *, bool firstRun);
-
   void PrefChanged(const char *aPref);
 
  private:
   bool mHaveProfile;
 
   bool mDiskCacheEnabled;
   int32_t mDiskCacheCapacity;      // in kilobytes
   int32_t mDiskCacheMaxEntrySize;  // in kilobytes
   nsCOMPtr<nsIFile> mDiskCacheParentDirectory;
-  bool mSmartSizeEnabled;
-
-  bool mShouldUseOldMaxSmartSize;
 
   bool mOfflineCacheEnabled;
   int32_t mOfflineCacheCapacity;  // in kilobytes
   nsCOMPtr<nsIFile> mOfflineCacheParentDirectory;
 
   bool mMemoryCacheEnabled;
   int32_t mMemoryCacheCapacity;      // in kilobytes
   int32_t mMemoryCacheMaxEntrySize;  // in kilobytes
@@ -195,100 +138,16 @@ class nsCacheProfilePrefObserver : publi
   int32_t mCacheCompressionLevel;
 
   bool mSanitizeOnShutdown;
   bool mClearCacheOnShutdown;
 };
 
 NS_IMPL_ISUPPORTS(nsCacheProfilePrefObserver, nsIObserver)
 
-class nsSetDiskSmartSizeCallback final : public nsITimerCallback,
-                                         public nsINamed {
-  ~nsSetDiskSmartSizeCallback() = default;
-
- public:
-  NS_DECL_THREADSAFE_ISUPPORTS
-
-  NS_IMETHOD Notify(nsITimer *aTimer) override {
-    if (nsCacheService::gService) {
-      nsCacheServiceAutoLock autoLock(
-          LOCK_TELEM(NSSETDISKSMARTSIZECALLBACK_NOTIFY));
-      nsCacheService::gService->SetDiskSmartSize_Locked();
-      nsCacheService::gService->mSmartSizeTimer = nullptr;
-    }
-    return NS_OK;
-  }
-
-  NS_IMETHOD GetName(nsACString &aName) override {
-    aName.AssignLiteral("nsSetDiskSmartSizeCallback");
-    return NS_OK;
-  }
-};
-
-NS_IMPL_ISUPPORTS(nsSetDiskSmartSizeCallback, nsITimerCallback, nsINamed)
-
-// Runnable sent to main thread after the cache IO thread calculates available
-// disk space, so that there is no race in setting mDiskCacheCapacity.
-class nsSetSmartSizeEvent : public Runnable {
- public:
-  explicit nsSetSmartSizeEvent(int32_t smartSize)
-      : mozilla::Runnable("nsSetSmartSizeEvent"), mSmartSize(smartSize) {}
-
-  NS_IMETHOD Run() override {
-    NS_ASSERTION(NS_IsMainThread(),
-                 "Setting smart size data off the main thread");
-
-    // Main thread may have already called nsCacheService::Shutdown
-    if (!nsCacheService::IsInitialized()) return NS_ERROR_NOT_AVAILABLE;
-
-    // Ensure smart sizing wasn't switched off while event was pending.
-    // It is safe to access the observer without the lock since we are
-    // on the main thread and the value changes only on the main thread.
-    if (!nsCacheService::gService->mObserver->SmartSizeEnabled()) return NS_OK;
-
-    nsCacheService::SetDiskCacheCapacity(mSmartSize);
-
-    nsCOMPtr<nsIPrefBranch> ps = do_GetService(NS_PREFSERVICE_CONTRACTID);
-    if (!ps ||
-        NS_FAILED(ps->SetIntPref(DISK_CACHE_SMART_SIZE_PREF, mSmartSize)))
-      NS_WARNING("Failed to set smart size pref");
-
-    return NS_OK;
-  }
-
- private:
-  int32_t mSmartSize;
-};
-
-// Runnable sent from main thread to cacheIO thread
-class nsGetSmartSizeEvent : public Runnable {
- public:
-  nsGetSmartSizeEvent(const nsAString &cachePath, uint32_t currentSize,
-                      bool shouldUseOldMaxSmartSize)
-      : mozilla::Runnable("nsGetSmartSizeEvent"),
-        mCachePath(cachePath),
-        mCurrentSize(currentSize),
-        mShouldUseOldMaxSmartSize(shouldUseOldMaxSmartSize) {}
-
-  // Calculates user's disk space available on a background thread and
-  // dispatches this value back to the main thread.
-  NS_IMETHOD Run() override {
-    uint32_t size;
-    size = nsCacheProfilePrefObserver::GetSmartCacheSize(
-        mCachePath, mCurrentSize, mShouldUseOldMaxSmartSize);
-    NS_DispatchToMainThread(new nsSetSmartSizeEvent(size));
-    return NS_OK;
-  }
-
- private:
-  nsString mCachePath;
-  uint32_t mCurrentSize;
-  bool mShouldUseOldMaxSmartSize;
-};
-
 class nsBlockOnCacheThreadEvent : public Runnable {
  public:
   nsBlockOnCacheThreadEvent()
       : mozilla::Runnable("nsBlockOnCacheThreadEvent") {}
   NS_IMETHOD Run() override {
     nsCacheServiceAutoLock autoLock(LOCK_TELEM(NSBLOCKONCACHETHREADEVENT_RUN));
     CACHE_LOG_DEBUG(("nsBlockOnCacheThreadEvent [%p]\n", this));
     nsCacheService::gService->mNotified = true;
@@ -400,67 +259,17 @@ nsCacheProfilePrefObserver::Observe(nsIS
   return NS_OK;
 }
 
 void nsCacheProfilePrefObserver::PrefChanged(const char *aPref) {
   // ignore pref changes until we're done switch profiles
   if (!mHaveProfile) return;
   // which preference changed?
   nsresult rv;
-  if (!strcmp(DISK_CACHE_ENABLE_PREF, aPref)) {
-    rv = Preferences::GetBool(DISK_CACHE_ENABLE_PREF, &mDiskCacheEnabled);
-    if (NS_FAILED(rv)) return;
-    nsCacheService::SetDiskCacheEnabled(DiskCacheEnabled());
-
-  } else if (!strcmp(DISK_CACHE_CAPACITY_PREF, aPref)) {
-    int32_t capacity = 0;
-    rv = Preferences::GetInt(DISK_CACHE_CAPACITY_PREF, &capacity);
-    if (NS_FAILED(rv)) return;
-    mDiskCacheCapacity = std::max(0, capacity);
-    nsCacheService::SetDiskCacheCapacity(mDiskCacheCapacity);
-
-    // Update the cache capacity when smart sizing is turned on/off
-  } else if (!strcmp(DISK_CACHE_SMART_SIZE_ENABLED_PREF, aPref)) {
-    // Is the update because smartsizing was turned on, or off?
-    rv = Preferences::GetBool(DISK_CACHE_SMART_SIZE_ENABLED_PREF,
-                              &mSmartSizeEnabled);
-    if (NS_FAILED(rv)) return;
-    int32_t newCapacity = 0;
-    if (mSmartSizeEnabled) {
-      nsCacheService::SetDiskSmartSize();
-    } else {
-      // Smart sizing switched off: use user specified size
-      rv = Preferences::GetInt(DISK_CACHE_CAPACITY_PREF, &newCapacity);
-      if (NS_FAILED(rv)) return;
-      mDiskCacheCapacity = std::max(0, newCapacity);
-      nsCacheService::SetDiskCacheCapacity(mDiskCacheCapacity);
-    }
-  } else if (!strcmp(DISK_CACHE_USE_OLD_MAX_SMART_SIZE_PREF, aPref)) {
-    rv = Preferences::GetBool(DISK_CACHE_USE_OLD_MAX_SMART_SIZE_PREF,
-                              &mShouldUseOldMaxSmartSize);
-    if (NS_FAILED(rv)) return;
-  } else if (!strcmp(DISK_CACHE_MAX_ENTRY_SIZE_PREF, aPref)) {
-    int32_t newMaxSize;
-    rv = Preferences::GetInt(DISK_CACHE_MAX_ENTRY_SIZE_PREF, &newMaxSize);
-    if (NS_FAILED(rv)) return;
-
-    mDiskCacheMaxEntrySize = std::max(-1, newMaxSize);
-    nsCacheService::SetDiskCacheMaxEntrySize(mDiskCacheMaxEntrySize);
-
-#if 0
-    } else if (!strcmp(DISK_CACHE_DIR_PREF, aPref)) {
-        // XXX We probaby don't want to respond to this pref except after
-        // XXX profile changes.  Ideally, there should be somekind of user
-        // XXX notification that the pref change won't take effect until
-        // XXX the next time the profile changes (browser launch)
-#endif
-  } else
-
-      // which preference changed?
-      if (!strcmp(OFFLINE_CACHE_ENABLE_PREF, aPref)) {
+  if (!strcmp(OFFLINE_CACHE_ENABLE_PREF, aPref)) {
     rv = Preferences::GetBool(OFFLINE_CACHE_ENABLE_PREF, &mOfflineCacheEnabled);
     if (NS_FAILED(rv)) return;
     nsCacheService::SetOfflineCacheEnabled(OfflineCacheEnabled());
 
   } else if (!strcmp(OFFLINE_CACHE_CAPACITY_PREF, aPref)) {
     int32_t capacity = 0;
     rv = Preferences::GetInt(OFFLINE_CACHE_CAPACITY_PREF, &capacity);
     if (NS_FAILED(rv)) return;
@@ -468,188 +277,22 @@ void nsCacheProfilePrefObserver::PrefCha
     nsCacheService::SetOfflineCacheCapacity(mOfflineCacheCapacity);
 #if 0
     } else if (!strcmp(OFFLINE_CACHE_DIR_PREF, aPref)) {
         // XXX We probaby don't want to respond to this pref except after
         // XXX profile changes.  Ideally, there should be some kind of user
         // XXX notification that the pref change won't take effect until
         // XXX the next time the profile changes (browser launch)
 #endif
-  } else
-
-      if (!strcmp(MEMORY_CACHE_ENABLE_PREF, aPref)) {
-    rv = Preferences::GetBool(MEMORY_CACHE_ENABLE_PREF, &mMemoryCacheEnabled);
-    if (NS_FAILED(rv)) return;
-    nsCacheService::SetMemoryCache();
-
-  } else if (!strcmp(MEMORY_CACHE_CAPACITY_PREF, aPref)) {
-    mMemoryCacheCapacity = -1;
-    (void)Preferences::GetInt(MEMORY_CACHE_CAPACITY_PREF,
-                              &mMemoryCacheCapacity);
-    nsCacheService::SetMemoryCache();
-  } else if (!strcmp(MEMORY_CACHE_MAX_ENTRY_SIZE_PREF, aPref)) {
-    int32_t newMaxSize;
-    rv = Preferences::GetInt(MEMORY_CACHE_MAX_ENTRY_SIZE_PREF, &newMaxSize);
-    if (NS_FAILED(rv)) return;
-
-    mMemoryCacheMaxEntrySize = std::max(-1, newMaxSize);
-    nsCacheService::SetMemoryCacheMaxEntrySize(mMemoryCacheMaxEntrySize);
-  } else if (!strcmp(CACHE_COMPRESSION_LEVEL_PREF, aPref)) {
-    mCacheCompressionLevel = CACHE_COMPRESSION_LEVEL;
-    (void)Preferences::GetInt(CACHE_COMPRESSION_LEVEL_PREF,
-                              &mCacheCompressionLevel);
-    mCacheCompressionLevel = std::max(0, mCacheCompressionLevel);
-    mCacheCompressionLevel = std::min(9, mCacheCompressionLevel);
-  } else if (!strcmp(SANITIZE_ON_SHUTDOWN_PREF, aPref)) {
-    rv = Preferences::GetBool(SANITIZE_ON_SHUTDOWN_PREF, &mSanitizeOnShutdown);
-    if (NS_FAILED(rv)) return;
-    nsCacheService::SetDiskCacheEnabled(DiskCacheEnabled());
-  } else if (!strcmp(CLEAR_ON_SHUTDOWN_PREF, aPref)) {
-    rv = Preferences::GetBool(CLEAR_ON_SHUTDOWN_PREF, &mClearCacheOnShutdown);
-    if (NS_FAILED(rv)) return;
-    nsCacheService::SetDiskCacheEnabled(DiskCacheEnabled());
   }
 }
 
-// Returns default ("smart") size (in KB) of cache, given available disk space
-// (also in KB)
-static uint32_t SmartCacheSize(const uint32_t availKB,
-                               bool shouldUseOldMaxSmartSize) {
-  uint32_t maxSize =
-      shouldUseOldMaxSmartSize ? OLD_MAX_CACHE_SIZE : MAX_CACHE_SIZE;
-
-  if (availKB > 100 * 1024 * 1024)
-    return maxSize;  // skip computing if we're over 100 GB
-
-  // Grow/shrink in 10 MB units, deliberately, so that in the common case we
-  // don't shrink cache and evict items every time we startup (it's important
-  // that we don't slow down startup benchmarks).
-  uint32_t sz10MBs = 0;
-  uint32_t avail10MBs = availKB / (1024 * 10);
-
-  // .5% of space above 25 GB
-  if (avail10MBs > 2500) {
-    sz10MBs += static_cast<uint32_t>((avail10MBs - 2500) * .005);
-    avail10MBs = 2500;
-  }
-  // 1% of space between 7GB -> 25 GB
-  if (avail10MBs > 700) {
-    sz10MBs += static_cast<uint32_t>((avail10MBs - 700) * .01);
-    avail10MBs = 700;
-  }
-  // 5% of space between 500 MB -> 7 GB
-  if (avail10MBs > 50) {
-    sz10MBs += static_cast<uint32_t>((avail10MBs - 50) * .05);
-    avail10MBs = 50;
-  }
-
-#ifdef ANDROID
-  // On Android, smaller/older devices may have very little storage and
-  // device owners may be sensitive to storage footprint: Use a smaller
-  // percentage of available space and a smaller minimum.
-
-  // 20% of space up to 500 MB (10 MB min)
-  sz10MBs += std::max<uint32_t>(1, static_cast<uint32_t>(avail10MBs * .2));
-#else
-  // 40% of space up to 500 MB (50 MB min)
-  sz10MBs += std::max<uint32_t>(5, static_cast<uint32_t>(avail10MBs * .4));
-#endif
-
-  return std::min<uint32_t>(maxSize, sz10MBs * 10 * 1024);
-}
-
-/* Computes our best guess for the default size of the user's disk cache,
- * based on the amount of space they have free on their hard drive.
- * We use a tiered scheme: the more space available,
- * the larger the disk cache will be. However, we do not want
- * to enable the disk cache to grow to an unbounded size, so the larger the
- * user's available space is, the smaller of a percentage we take. We set a
- * lower bound of 50MB and an upper bound of 1GB.
- *
- *@param:  None.
- *@return: The size that the user's disk cache should default to, in kBytes.
- */
-uint32_t nsCacheProfilePrefObserver::GetSmartCacheSize(
-    const nsAString &cachePath, uint32_t currentSize,
-    bool shouldUseOldMaxSmartSize) {
-  // Check for free space on device where cache directory lives
-  nsresult rv;
-  nsCOMPtr<nsIFile> cacheDirectory(
-      do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv));
-  if (NS_FAILED(rv) || !cacheDirectory) return DEFAULT_CACHE_SIZE;
-  rv = cacheDirectory->InitWithPath(cachePath);
-  if (NS_FAILED(rv)) return DEFAULT_CACHE_SIZE;
-  int64_t bytesAvailable;
-  rv = cacheDirectory->GetDiskSpaceAvailable(&bytesAvailable);
-  if (NS_FAILED(rv)) return DEFAULT_CACHE_SIZE;
-
-  return SmartCacheSize(
-      static_cast<uint32_t>((bytesAvailable / 1024) + currentSize),
-      shouldUseOldMaxSmartSize);
-}
-
-/* Determine if we are permitted to dynamically size the user's disk cache based
- * on their disk space available. We may do this so long as the pref
- * smart_size.enabled is true.
- */
-bool nsCacheProfilePrefObserver::PermittedToSmartSize(nsIPrefBranch *branch,
-                                                      bool firstRun) {
-  nsresult rv;
-  if (firstRun) {
-    // check if user has set cache size in the past
-    bool userSet;
-    rv = branch->PrefHasUserValue(DISK_CACHE_CAPACITY_PREF, &userSet);
-    if (NS_FAILED(rv)) userSet = true;
-    if (userSet) {
-      int32_t oldCapacity;
-      // If user explicitly set cache size to be smaller than old default
-      // of 50 MB, then keep user's value. Otherwise use smart sizing.
-      rv = branch->GetIntPref(DISK_CACHE_CAPACITY_PREF, &oldCapacity);
-      if (oldCapacity < PRE_GECKO_2_0_DEFAULT_CACHE_SIZE) {
-        mSmartSizeEnabled = false;
-        branch->SetBoolPref(DISK_CACHE_SMART_SIZE_ENABLED_PREF,
-                            mSmartSizeEnabled);
-        return mSmartSizeEnabled;
-      }
-    }
-    // Set manual setting to MAX cache size as starting val for any
-    // adjustment by user: (bug 559942 comment 65)
-    int32_t maxSize =
-        mShouldUseOldMaxSmartSize ? OLD_MAX_CACHE_SIZE : MAX_CACHE_SIZE;
-    branch->SetIntPref(DISK_CACHE_CAPACITY_PREF, maxSize);
-  }
-
-  rv = branch->GetBoolPref(DISK_CACHE_SMART_SIZE_ENABLED_PREF,
-                           &mSmartSizeEnabled);
-  if (NS_FAILED(rv)) mSmartSizeEnabled = false;
-  return mSmartSizeEnabled;
-}
-
 nsresult nsCacheProfilePrefObserver::ReadPrefs(nsIPrefBranch *branch) {
   nsresult rv = NS_OK;
 
-  // read disk cache device prefs
-  mDiskCacheEnabled = true;  // presume disk cache is enabled
-  (void)branch->GetBoolPref(DISK_CACHE_ENABLE_PREF, &mDiskCacheEnabled);
-
-  mDiskCacheCapacity = DISK_CACHE_CAPACITY;
-  (void)branch->GetIntPref(DISK_CACHE_CAPACITY_PREF, &mDiskCacheCapacity);
-  mDiskCacheCapacity = std::max(0, mDiskCacheCapacity);
-
-  (void)branch->GetIntPref(DISK_CACHE_MAX_ENTRY_SIZE_PREF,
-                           &mDiskCacheMaxEntrySize);
-  mDiskCacheMaxEntrySize = std::max(-1, mDiskCacheMaxEntrySize);
-
-  (void)branch->GetComplexValue(DISK_CACHE_DIR_PREF,  // ignore error
-                                NS_GET_IID(nsIFile),
-                                getter_AddRefs(mDiskCacheParentDirectory));
-
-  (void)branch->GetBoolPref(DISK_CACHE_USE_OLD_MAX_SMART_SIZE_PREF,
-                            &mShouldUseOldMaxSmartSize);
-
   if (!mDiskCacheParentDirectory) {
     nsCOMPtr<nsIFile> directory;
 
     // try to get the disk cache parent directory
     rv = NS_GetSpecialDirectory(NS_APP_CACHE_PARENT_DIR,
                                 getter_AddRefs(directory));
     if (NS_FAILED(rv)) {
       // try to get the profile directory (there may not be a profile yet)
@@ -668,37 +311,16 @@ nsresult nsCacheProfilePrefObserver::Rea
     if (!directory && PR_GetEnv("NECKO_DEV_ENABLE_DISK_CACHE")) {
       rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR,
                                   getter_AddRefs(directory));
     }
     if (directory) {
       mDiskCacheParentDirectory = directory;
     }
   }
-  if (mDiskCacheParentDirectory) {
-    bool firstSmartSizeRun;
-    rv = branch->GetBoolPref(DISK_CACHE_SMART_SIZE_FIRST_RUN_PREF,
-                             &firstSmartSizeRun);
-    if (NS_FAILED(rv)) firstSmartSizeRun = false;
-    if (PermittedToSmartSize(branch, firstSmartSizeRun)) {
-      // Avoid evictions: use previous cache size until smart size event
-      // updates mDiskCacheCapacity
-      rv = branch->GetIntPref(firstSmartSizeRun ? DISK_CACHE_CAPACITY_PREF
-                                                : DISK_CACHE_SMART_SIZE_PREF,
-                              &mDiskCacheCapacity);
-      if (NS_FAILED(rv)) mDiskCacheCapacity = DEFAULT_CACHE_SIZE;
-    }
-
-    if (firstSmartSizeRun) {
-      // It is no longer our first run
-      rv = branch->SetBoolPref(DISK_CACHE_SMART_SIZE_FIRST_RUN_PREF, false);
-      if (NS_FAILED(rv))
-        NS_WARNING("Failed setting first_run pref in ReadPrefs.");
-    }
-  }
 
   // read offline cache device prefs
   mOfflineCacheEnabled = true;  // presume offline cache is enabled
   (void)branch->GetBoolPref(OFFLINE_CACHE_ENABLE_PREF, &mOfflineCacheEnabled);
 
   mOfflineCacheCapacity = OFFLINE_CACHE_CAPACITY;
   (void)branch->GetIntPref(OFFLINE_CACHE_CAPACITY_PREF, &mOfflineCacheCapacity);
   mOfflineCacheCapacity = std::max(0, mOfflineCacheCapacity);
@@ -734,37 +356,16 @@ nsresult nsCacheProfilePrefObserver::Rea
                                   getter_AddRefs(directory));
     }
 #endif
     if (directory) {
       mOfflineCacheParentDirectory = directory;
     }
   }
 
-  // read memory cache device prefs
-  (void)branch->GetBoolPref(MEMORY_CACHE_ENABLE_PREF, &mMemoryCacheEnabled);
-
-  mMemoryCacheCapacity = -1;
-  (void)branch->GetIntPref(MEMORY_CACHE_CAPACITY_PREF, &mMemoryCacheCapacity);
-
-  (void)branch->GetIntPref(MEMORY_CACHE_MAX_ENTRY_SIZE_PREF,
-                           &mMemoryCacheMaxEntrySize);
-  mMemoryCacheMaxEntrySize = std::max(-1, mMemoryCacheMaxEntrySize);
-
-  // read cache compression level pref
-  mCacheCompressionLevel = CACHE_COMPRESSION_LEVEL;
-  (void)branch->GetIntPref(CACHE_COMPRESSION_LEVEL_PREF,
-                           &mCacheCompressionLevel);
-  mCacheCompressionLevel = std::max(0, mCacheCompressionLevel);
-  mCacheCompressionLevel = std::min(9, mCacheCompressionLevel);
-
-  // read cache shutdown sanitization prefs
-  (void)branch->GetBoolPref(SANITIZE_ON_SHUTDOWN_PREF, &mSanitizeOnShutdown);
-  (void)branch->GetBoolPref(CLEAR_ON_SHUTDOWN_PREF, &mClearCacheOnShutdown);
-
   return rv;
 }
 
 nsresult nsCacheService::DispatchToCacheIOThread(nsIRunnable *event) {
   if (!gService || !gService->mCacheIOThread) return NS_ERROR_NOT_AVAILABLE;
   return gService->mCacheIOThread->Dispatch(event, NS_DISPATCH_NORMAL);
 }
 
@@ -1102,21 +703,16 @@ void nsCacheService::Shutdown() {
     nsCacheServiceAutoLock lock(LOCK_TELEM(NSCACHESERVICE_SHUTDOWN));
     NS_ASSERTION(mInitialized, "Bad state");
 
     mInitialized = false;
 
     // Clear entries
     ClearDoomList();
 
-    if (mSmartSizeTimer) {
-      mSmartSizeTimer->Cancel();
-      mSmartSizeTimer = nullptr;
-    }
-
     // Make sure to wait for any pending cache-operations before
     // proceeding with destructive actions (bug #620660)
     (void)SyncWithCacheIOThread();
     mActiveEntries.Shutdown();
 
     // obtain the disk cache directory in case we need to sanitize it
     parentDir = mObserver->DiskCacheParentDirectory();
     shouldSanitize = mObserver->SanitizeAtShutdown();
@@ -1315,17 +911,17 @@ NS_IMETHODIMP nsCacheService::VisitEntri
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 nsresult nsCacheService::VisitEntriesInternal(nsICacheVisitor *visitor) {
   NS_ENSURE_ARG_POINTER(visitor);
 
   nsCacheServiceAutoLock lock(LOCK_TELEM(NSCACHESERVICE_VISITENTRIES));
 
-  if (!(mEnableDiskDevice || mEnableMemoryDevice))
+  if (!(mEnableDiskDevice || mEnableMemoryDevice || mEnableOfflineDevice))
     return NS_ERROR_NOT_AVAILABLE;
 
   // XXX record the fact that a visitation is in progress,
   // XXX i.e. keep list of visitors in progress.
 
   nsresult rv = NS_OK;
   // If there is no memory device, there are then also no entries to visit...
   if (mMemoryDevice) {
@@ -1456,84 +1052,19 @@ nsresult nsCacheService::CreateDiskDevic
     printf("###\n");
 #endif
     mEnableDiskDevice = false;
     delete mDiskDevice;
     mDiskDevice = nullptr;
     return rv;
   }
 
-  NS_ASSERTION(!mSmartSizeTimer, "Smartsize timer was already fired!");
-
-  // Disk device is usually created during the startup. Delay smart size
-  // calculation to avoid possible massive IO caused by eviction of entries
-  // in case the new smart size is smaller than current cache usage.
-  rv = NS_NewTimerWithCallback(getter_AddRefs(mSmartSizeTimer),
-                               new nsSetDiskSmartSizeCallback(), 1000 * 60 * 3,
-                               nsITimer::TYPE_ONE_SHOT);
-  if (NS_FAILED(rv)) {
-    NS_WARNING("Failed to post smart size timer");
-  }
-  // Ignore state of the timer and return success since the purpose of the
-  // method (create the disk-device) has been fulfilled
-
   return NS_OK;
 }
 
-// Runnable sent from cache thread to main thread
-class nsDisableOldMaxSmartSizePrefEvent : public Runnable {
- public:
-  nsDisableOldMaxSmartSizePrefEvent()
-      : mozilla::Runnable("nsDisableOldMaxSmartSizePrefEvent") {}
-
-  NS_IMETHOD Run() override {
-    // Main thread may have already called nsCacheService::Shutdown
-    if (!nsCacheService::IsInitialized()) return NS_ERROR_NOT_AVAILABLE;
-
-    nsCOMPtr<nsIPrefBranch> branch = do_GetService(NS_PREFSERVICE_CONTRACTID);
-    if (!branch) {
-      return NS_ERROR_NOT_AVAILABLE;
-    }
-
-    nsresult rv =
-        branch->SetBoolPref(DISK_CACHE_USE_OLD_MAX_SMART_SIZE_PREF, false);
-    if (NS_FAILED(rv)) {
-      NS_WARNING("Failed to disable old max smart size");
-      return rv;
-    }
-
-    // It is safe to call SetDiskSmartSize_Locked() without holding the lock
-    // when we are on main thread and nsCacheService is initialized.
-    nsCacheService::gService->SetDiskSmartSize_Locked();
-
-    if (nsCacheService::gService->mObserver->PermittedToSmartSize(branch,
-                                                                  false)) {
-      rv = branch->SetIntPref(DISK_CACHE_CAPACITY_PREF, MAX_CACHE_SIZE);
-      if (NS_FAILED(rv)) {
-        NS_WARNING("Failed to set cache capacity pref");
-      }
-    }
-
-    return NS_OK;
-  }
-};
-
-void nsCacheService::MarkStartingFresh() {
-  if (!gService || !gService->mObserver->ShouldUseOldMaxSmartSize()) {
-    // Already using new max, nothing to do here
-    return;
-  }
-
-  gService->mObserver->SetUseNewMaxSmartSize(true);
-
-  // We always dispatch an event here because we don't want to deal with lock
-  // reentrance issues.
-  NS_DispatchToMainThread(new nsDisableOldMaxSmartSizePrefEvent());
-}
-
 nsresult nsCacheService::GetOfflineDevice(nsOfflineCacheDevice **aDevice) {
   if (!mOfflineDevice) {
     nsresult rv = CreateOfflineDevice();
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   NS_ADDREF(*aDevice = mOfflineDevice);
   return NS_OK;
@@ -2772,28 +2303,16 @@ void nsCacheService::LogCacheStatistics(
   CACHE_LOG_INFO(("    Max Data Size  = %d\n", mMaxDataSize));
   CACHE_LOG_INFO(("\n"));
   CACHE_LOG_INFO(
       ("    Deactivate Failures         = %d\n", mDeactivateFailures));
   CACHE_LOG_INFO(
       ("    Deactivated Unbound Entries = %d\n", mDeactivatedUnboundEntries));
 }
 
-nsresult nsCacheService::SetDiskSmartSize() {
-  nsCacheServiceAutoLock lock(LOCK_TELEM(NSCACHESERVICE_SETDISKSMARTSIZE));
-
-  if (!gService) return NS_ERROR_NOT_AVAILABLE;
-
-  return gService->SetDiskSmartSize_Locked();
-}
-
-nsresult nsCacheService::SetDiskSmartSize_Locked() {
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
 void nsCacheService::MoveOrRemoveDiskCache(nsIFile *aOldCacheDir,
                                            nsIFile *aNewCacheDir,
                                            const char *aCacheSubdir) {
   bool same;
   if (NS_FAILED(aOldCacheDir->Equals(aNewCacheDir, &same)) || same) return;
 
   nsCOMPtr<nsIFile> aOldCacheSubdir;
   aOldCacheDir->Clone(getter_AddRefs(aOldCacheSubdir));
--- a/netwerk/cache/nsCacheService.h
+++ b/netwerk/cache/nsCacheService.h
@@ -129,21 +129,16 @@ class nsCacheService final : public nsIC
 
   static nsCacheService *GlobalInstance() { return gService; }
 
   static nsresult DoomEntry(nsCacheEntry *entry);
 
   static bool IsStorageEnabledForPolicy_Locked(nsCacheStoragePolicy policy);
 
   /**
-   * Called by disk cache to notify us to use the new max smart size
-   */
-  static void MarkStartingFresh();
-
-  /**
    * Methods called by nsApplicationCacheService
    */
 
   nsresult GetOfflineDevice(nsOfflineCacheDevice **aDevice);
 
   /**
    * Creates an offline cache device that works over a specific profile
    * directory. A tool to preload offline cache for profiles different from the
@@ -186,19 +181,16 @@ class nsCacheService final : public nsIC
   static void SetOfflineCacheEnabled(bool enabled);
   // Sets the offline cache capacity (in kilobytes)
   static void SetOfflineCacheCapacity(int32_t capacity);
 
   static void SetMemoryCache();
 
   static void SetCacheCompressionLevel(int32_t level);
 
-  // Starts smart cache size computation if disk device is available
-  static nsresult SetDiskSmartSize();
-
   static void MoveOrRemoveDiskCache(nsIFile *aOldCacheDir,
                                     nsIFile *aNewCacheDir,
                                     const char *aCacheSubdir);
 
   nsresult Init();
   void Shutdown();
 
   static bool IsInitialized() {
@@ -221,21 +213,18 @@ class nsCacheService final : public nsIC
                                  bool streamBased, nsICacheSession **result);
   nsresult VisitEntriesInternal(nsICacheVisitor *visitor);
   nsresult EvictEntriesInternal(nsCacheStoragePolicy storagePolicy);
 
  private:
   friend class nsCacheServiceAutoLock;
   friend class nsOfflineCacheDevice;
   friend class nsProcessRequestEvent;
-  friend class nsSetSmartSizeEvent;
   friend class nsBlockOnCacheThreadEvent;
-  friend class nsSetDiskSmartSizeCallback;
   friend class nsDoomEvent;
-  friend class nsDisableOldMaxSmartSizePrefEvent;
   friend class nsDiskCacheMap;
   friend class nsAsyncDoomEvent;
   friend class nsCacheEntryDescriptor;
 
   /**
    * Internal Methods
    */
 
@@ -288,18 +277,16 @@ class nsCacheService final : public nsIC
 
   void ClearDoomList(void);
   void DoomActiveEntries(DoomCheckFn check);
   void CloseAllStreams();
   void FireClearNetworkCacheStoredAnywhereNotification();
 
   void LogCacheStatistics();
 
-  nsresult SetDiskSmartSize_Locked();
-
   /**
    *  Data Members
    */
 
   static nsCacheService *gService;  // there can be only one...
 
   nsCOMPtr<mozIStorageService> mStorageService;
 
@@ -310,17 +297,16 @@ class nsCacheService final : public nsIC
   bool mNotified;
 
   mozilla::Mutex mTimeStampLock;
   mozilla::TimeStamp mLockAcquiredTimeStamp;
 
   nsCOMPtr<nsIThread> mCacheIOThread;
 
   nsTArray<nsISupports *> mDoomedObjects;
-  nsCOMPtr<nsITimer> mSmartSizeTimer;
 
   bool mInitialized;
   bool mClearingEntries;
 
   bool mEnableMemoryDevice;
   bool mEnableDiskDevice;
   bool mEnableOfflineDevice;
 
--- a/netwerk/cache/nsDiskCacheDevice.cpp
+++ b/netwerk/cache/nsDiskCacheDevice.cpp
@@ -933,17 +933,16 @@ nsresult nsDiskCacheDevice::OpenDiskCach
       rv = nsDeleteDir::DeleteDir(mCacheDirectory, true, 60000);
       if (NS_FAILED(rv)) return rv;
       exists = false;
     }
   }
 
   // if we don't have a cache directory, create one and open it
   if (!exists) {
-    nsCacheService::MarkStartingFresh();
     rv = mCacheDirectory->Create(nsIFile::DIRECTORY_TYPE, 0777);
     CACHE_LOG_PATH(LogLevel::Info, "\ncreate cache directory: %s\n",
                    mCacheDirectory);
     CACHE_LOG_INFO(("mCacheDirectory->Create() = %" PRIx32 "\n",
                     static_cast<uint32_t>(rv)));
     if (NS_FAILED(rv)) return rv;
 
     // reopen the cache map
--- a/testing/profiles/perf/user.js
+++ b/testing/profiles/perf/user.js
@@ -2,17 +2,16 @@
 /* globals user_pref */
 user_pref("app.normandy.api_url", "https://127.0.0.1/selfsupport-dummy/");
 user_pref("browser.EULA.override", true);
 user_pref("browser.aboutHomeSnippets.updateUrl", "https://127.0.0.1/about-dummy/");
 user_pref("browser.addon-watch.interval", -1); // Deactivate add-on watching
 // Disable Bookmark backups by default.
 user_pref("browser.bookmarks.max_backups", 0);
 user_pref("browser.cache.disk.smart_size.enabled", false);
-user_pref("browser.cache.disk.smart_size.first_run", false);
 user_pref("browser.chrome.dynamictoolbar", false);
 user_pref("browser.contentHandlers.types.0.uri", "http://127.0.0.1/rss?url=%s");
 user_pref("browser.contentHandlers.types.1.uri", "http://127.0.0.1/rss?url=%s");
 user_pref("browser.contentHandlers.types.2.uri", "http://127.0.0.1/rss?url=%s");
 user_pref("browser.contentHandlers.types.3.uri", "http://127.0.0.1/rss?url=%s");
 user_pref("browser.contentHandlers.types.4.uri", "http://127.0.0.1/rss?url=%s");
 user_pref("browser.contentHandlers.types.5.uri", "http://127.0.0.1/rss?url=%s");
 user_pref("browser.link.open_newwindow", 2);
--- a/testing/talos/talos/unittests/test_talosconfig_browser_config.json
+++ b/testing/talos/talos/unittests/test_talosconfig_browser_config.json
@@ -1,1 +1,1 @@
-{'deviceroot': '', 'dirs': {}, 'repository': 'https://hg.mozilla.org/releases/mozilla-release', 'buildid': '20131205075310', 'results_log': 'pathtoresults_log', 'symbols_path': None, 'bcontroller_config': 'pathtobcontroller', 'host': '', 'browser_name': 'Firefox', 'sourcestamp': '39faf812aaec', 'remote': False, 'child_process': 'plugin-container', 'browser_version': '26.0', 'extra_args': '', 'develop': True, 'preferences': {'browser.display.overlaynavbuttons': False, 'extensions.getAddons.get.url': 'http://127.0.0.1/extensions-dummy/repositoryGetURL', 'dom.max_chrome_script_run_time': 0, 'network.proxy.type': 1, 'extensions.update.background.url': 'http://127.0.0.1/extensions-dummy/updateBackgroundURL', 'network.proxy.http': 'localhost', 'plugins.update.url': 'http://127.0.0.1/plugins-dummy/updateCheckURL', 'dom.max_script_run_time': 0, 'extensions.update.enabled': False, 'browser.safebrowsing.keyURL': 'http://127.0.0.1/safebrowsing-dummy/newkey', 'media.navigator.permission.disabled': True, 'app.update.checkInstallTime': False, 'app.update.disabledForTesting': True, 'extensions.blocklist.url': 'http://127.0.0.1/extensions-dummy/blocklistURL', 'browser.EULA.override': True, 'extensions.checkCompatibility': False, 'talos.logfile': 'pathtofile', 'browser.safebrowsing.gethashURL': 'http://127.0.0.1/safebrowsing-dummy/gethash', 'extensions.hotfix.url': 'http://127.0.0.1/extensions-dummy/hotfixURL', 'dom.disable_window_move_resize': True, 'network.proxy.http_port': 80, 'browser.dom.window.dump.enabled': True, 'extensions.update.url': 'http://127.0.0.1/extensions-dummy/updateURL', 'browser.chrome.dynamictoolbar': False,  'browser.link.open_newwindow': 2, 'browser.cache.disk.smart_size.first_run': False, 'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer': True, 'dom.disable_open_during_load': False, 'extensions.getAddons.search.browseURL': 'http://127.0.0.1/extensions-dummy/repositoryBrowseURL', 'browser.cache.disk.smart_size.enabled': False, 'extensions.getAddons.getWithPerformance.url': 'http://127.0.0.1/extensions-dummy/repositoryGetWithPerformanceURL', 'hangmonitor.timeout': 0, 'dom.send_after_paint_to_content': True, 'security.fileuri.strict_origin_policy': False, 'media.capturestream_hints.enabled': True, 'extensions.update.notifyUser': False, 'extensions.blocklist.enabled': False, 'browser.bookmarks.max_backups': 0, 'browser.shell.checkDefaultBrowser': False, 'media.peerconnection.enabled': True, 'dom.disable_window_flip': True, 'security.enable_java': False, 'browser.warnOnQuit': False, 'media.navigator.enabled': True, 'browser.safebrowsing.updateURL': 'http://127.0.0.1/safebrowsing-dummy/update', 'dom.allow_scripts_to_close_windows': True, 'extensions.webservice.discoverURL': 'http://127.0.0.1/extensions-dummy/discoveryURL'}, 'test_timeout': 1200, 'title': 'qm-pxp01', 'error_filename': 'pathtoerrorfile', 'webserver': 'localhost:15707', 'browser_path':ffox_path, 'port': 20701, 'browser_log': 'browser_output.txt', 'process': 'firefox.exe', 'xperf_path': 'C:/Program Files/Microsoft Windows Performance Toolkit/xperf.exe', 'extensions': ['pathtopageloader'], 'fennecIDs': '', 'init_url': 'http://localhost:15707/getInfo.html', 'browser_wait': 5}
+{'deviceroot': '', 'dirs': {}, 'repository': 'https://hg.mozilla.org/releases/mozilla-release', 'buildid': '20131205075310', 'results_log': 'pathtoresults_log', 'symbols_path': None, 'bcontroller_config': 'pathtobcontroller', 'host': '', 'browser_name': 'Firefox', 'sourcestamp': '39faf812aaec', 'remote': False, 'child_process': 'plugin-container', 'browser_version': '26.0', 'extra_args': '', 'develop': True, 'preferences': {'browser.display.overlaynavbuttons': False, 'extensions.getAddons.get.url': 'http://127.0.0.1/extensions-dummy/repositoryGetURL', 'dom.max_chrome_script_run_time': 0, 'network.proxy.type': 1, 'extensions.update.background.url': 'http://127.0.0.1/extensions-dummy/updateBackgroundURL', 'network.proxy.http': 'localhost', 'plugins.update.url': 'http://127.0.0.1/plugins-dummy/updateCheckURL', 'dom.max_script_run_time': 0, 'extensions.update.enabled': False, 'browser.safebrowsing.keyURL': 'http://127.0.0.1/safebrowsing-dummy/newkey', 'media.navigator.permission.disabled': True, 'app.update.checkInstallTime': False, 'app.update.disabledForTesting': True, 'extensions.blocklist.url': 'http://127.0.0.1/extensions-dummy/blocklistURL', 'browser.EULA.override': True, 'extensions.checkCompatibility': False, 'talos.logfile': 'pathtofile', 'browser.safebrowsing.gethashURL': 'http://127.0.0.1/safebrowsing-dummy/gethash', 'extensions.hotfix.url': 'http://127.0.0.1/extensions-dummy/hotfixURL', 'dom.disable_window_move_resize': True, 'network.proxy.http_port': 80, 'browser.dom.window.dump.enabled': True, 'extensions.update.url': 'http://127.0.0.1/extensions-dummy/updateURL', 'browser.chrome.dynamictoolbar': False,  'browser.link.open_newwindow': 2, 'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer': True, 'dom.disable_open_during_load': False, 'extensions.getAddons.search.browseURL': 'http://127.0.0.1/extensions-dummy/repositoryBrowseURL', 'browser.cache.disk.smart_size.enabled': False, 'extensions.getAddons.getWithPerformance.url': 'http://127.0.0.1/extensions-dummy/repositoryGetWithPerformanceURL', 'hangmonitor.timeout': 0, 'dom.send_after_paint_to_content': True, 'security.fileuri.strict_origin_policy': False, 'media.capturestream_hints.enabled': True, 'extensions.update.notifyUser': False, 'extensions.blocklist.enabled': False, 'browser.bookmarks.max_backups': 0, 'browser.shell.checkDefaultBrowser': False, 'media.peerconnection.enabled': True, 'dom.disable_window_flip': True, 'security.enable_java': False, 'browser.warnOnQuit': False, 'media.navigator.enabled': True, 'browser.safebrowsing.updateURL': 'http://127.0.0.1/safebrowsing-dummy/update', 'dom.allow_scripts_to_close_windows': True, 'extensions.webservice.discoverURL': 'http://127.0.0.1/extensions-dummy/discoveryURL'}, 'test_timeout': 1200, 'title': 'qm-pxp01', 'error_filename': 'pathtoerrorfile', 'webserver': 'localhost:15707', 'browser_path':ffox_path, 'port': 20701, 'browser_log': 'browser_output.txt', 'process': 'firefox.exe', 'xperf_path': 'C:/Program Files/Microsoft Windows Performance Toolkit/xperf.exe', 'extensions': ['pathtopageloader'], 'fennecIDs': '', 'init_url': 'http://localhost:15707/getInfo.html', 'browser_wait': 5}