Bug 493559 - The 'Clear Recent History' dialog can be too slow when Everything is selected; r=johnath
authorDrew Willcoxon <adw@mozilla.com>
Tue, 19 May 2009 19:31:42 +0430
changeset 28583 051632129488a4a7f0db3c39638bd07a6fa5168c
parent 28582 c013ca0da569d5e00baf19a8ebe9572f8f007f68
child 28584 7255df34c791f5f1c1d959b659b019e029955e25
push id7123
push userehsan.akhgari@gmail.com
push dateTue, 19 May 2009 15:02:43 +0000
treeherdermozilla-central@051632129488 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohnath
bugs493559
milestone1.9.2a1pre
Bug 493559 - The 'Clear Recent History' dialog can be too slow when Everything is selected; r=johnath
browser/base/content/sanitizeDialog.js
--- a/browser/base/content/sanitizeDialog.js
+++ b/browser/base/content/sanitizeDialog.js
@@ -151,28 +151,19 @@ var gSanitizePromptDialog = {
    */
   ensureWarningIsInited: function ()
   {
     if (this._warningIsInited)
       return;
 
     this._warningIsInited = true;
 
-    // Get the number of items in history and the oldest item.
-    var histServ = Cc["@mozilla.org/browser/nav-history-service;1"].
-                   getService(Ci.nsINavHistoryService);
-    var query = histServ.getNewQuery();
-    var opts = histServ.getNewQueryOptions();
-    opts.sortingMode = opts.SORT_BY_DATE_ASCENDING;
-    opts.queryType = opts.QUERY_TYPE_HISTORY;
-    var result = histServ.executeQuery(query, opts);
-    result.root.containerOpen = true;
-    var numItems = result.root.childCount;
-    var oldestTime = numItems > 0 ? result.root.getChild(0).time : null;
-    result.root.containerOpen = false;
+    // If the date and time-aware locale warning string is ever used again,
+    // initialize it here.  Currently we use the no-visits warning string,
+    // which does not include date and time.  See bug 480169 comment 48.
 
     var warningDesc = document.getElementById("sanitizeEverythingWarning");
     warningDesc.textContent =
       this.bundleBrowser.getString("sanitizeEverythingNoVisitsWarning");
   },
 
   checkPrefs : function ()
   {