Bug 896276 - Use Date.now() rather than nsIAppStartup.getStartupInfo().process to detect profiles that haven't been used for a while. r=mak

This commit is contained in:
Dão Gottwald 2013-07-27 17:22:56 +02:00
parent 5558d8edd0
commit 57c9372e6e

View File

@ -599,10 +599,9 @@ BrowserGlue.prototype = {
// Offer to reset a user's profile if it hasn't been used for 60 days.
const OFFER_PROFILE_RESET_INTERVAL_MS = 60 * 24 * 60 * 60 * 1000;
let processStartupTime = Services.startup.getStartupInfo().process;
let lastUse = Services.appinfo.replacedLockTime;
if (processStartupTime && lastUse &&
processStartupTime.getTime() - lastUse >= OFFER_PROFILE_RESET_INTERVAL_MS) {
if (lastUse &&
Date.now() - lastUse >= OFFER_PROFILE_RESET_INTERVAL_MS) {
this._resetUnusedProfileNotification();
}
},