From f91a54288d56a99a2dbba8c444545826966d68e9 Mon Sep 17 00:00:00 2001 From: Drew Willcoxon Date: Tue, 19 May 2009 19:31:42 +0430 Subject: [PATCH] Bug 493559 - The 'Clear Recent History' dialog can be too slow when Everything is selected; r=johnath --- browser/base/content/sanitizeDialog.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/browser/base/content/sanitizeDialog.js b/browser/base/content/sanitizeDialog.js index 8572369102f..fb811c33729 100644 --- a/browser/base/content/sanitizeDialog.js +++ b/browser/base/content/sanitizeDialog.js @@ -156,18 +156,9 @@ var gSanitizePromptDialog = { 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 =