Bug 644424 - Reduce the remote tabs refresh delay and add a pref for it [r=mbrubeck]
--- a/mobile/app/mobile.js
+++ b/mobile/app/mobile.js
@@ -126,16 +126,19 @@ pref("network.autodial-helper.enabled",
// See bug 545869 for details on why these are set the way they are
pref("network.buffer.cache.count", 24);
pref("network.buffer.cache.size", 16384);
/* history max results display */
pref("browser.display.history.maxresults", 100);
+/* How many times should have passed before the remote tabs list is refreshed */
+pref("browser.display.remotetabs.timeout", 10);
+
/* session history */
pref("browser.sessionhistory.max_total_viewers", 1);
pref("browser.sessionhistory.max_entries", 50);
pref("browser.sessionhistory.optimize_eviction", true);
/* session store */
pref("browser.sessionstore.resume_session_once", false);
pref("browser.sessionstore.resume_from_crash", true);
--- a/mobile/chrome/content/bindings.xml
+++ b/mobile/chrome/content/bindings.xml
@@ -1379,17 +1379,17 @@
// Don't do anything if the tabs engine isn't ready
let engine = Weave.Engines.get("tabs");
if (!engine)
return [];
// Don't bother refetching tabs if we already did so recently
let lastFetch = Weave.Svc.Prefs.get("lastTabFetch", 0);
let now = Math.floor(Date.now() / 1000);
- if (now - lastFetch >= 30) {
+ if (now - lastFetch >= Services.prefs.getIntPref("browser.display.remotabs.timeout")) {
// Force a sync only for the tabs engine
engine.lastModified = null;
engine.sync();
Weave.Svc.Prefs.set("lastTabFetch", now);
};
// Generate the list of tabs
let tabs = [];