Bug 603518 - If no tabs are sync'd, integrated Sync UI should not show device name
authorFabrice Desré <fabrice@mozilla.com>
Fri, 14 Jan 2011 10:19:42 -0800
changeset 67258 5fdbc7fca14e52f3cc041067e5283b2a5b24eba9
parent 67257 86691d94bede264e2176d5d8926fc60cfc268f57
child 67259 2b4bbb67ff6a9c875e25ad8d387c17b3eeb7bac5
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs603518
Bug 603518 - If no tabs are sync'd, integrated Sync UI should not show device name
mobile/chrome/content/bindings.xml
--- a/mobile/chrome/content/bindings.xml
+++ b/mobile/chrome/content/bindings.xml
@@ -1354,16 +1354,19 @@
             engine.lastModified = null;
             engine.sync();
             Weave.Svc.Prefs.set("lastTabFetch", now);
           };
 
           // Generate the list of tabs
           let tabs = [];
           for (let [guid, client] in Iterator(engine.getAllClients())) {
+            if (!client.tabs.length)
+              continue;
+
             tabs.push({ name: client.clientName });
 
             client.tabs.forEach(function({title, urlHistory, icon}) {
               let pageURL = urlHistory[0];
 
               tabs.push({
                 title: title || pageURL,
                 uri: pageURL,