When there are no updates to write to an xml file just delete the associated xml file
Cleaned up loading of the updates.xml and active-update.xml files so |_ensureUpdates| is no longer needed
Added dirty check for whether to write the update history in updates.xml
Adds errorCode property to nsIUpdatePatch so it is saved to the xml
Adds errorCode for trying to apply an older version or same version with the same build ID
Adds errorCode for when there is a no status file
Adds errorCode for channel change
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.
MozReview-Commit-ID: 4ecl3RZhOwC
--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
This ping will be sent as soon as an update is ready to be applied, after
it's downloaded. This is currently enabled but protected behind the
'toolkit.telemetry.updatePing.enabled' preference.
MozReview-Commit-ID: 4TuM0e5MzBl
--HG--
extra : rebase_source : aa3ebda3cf1e1fc2cdb8c294a643973c5101fa1c
The patch which originally disabled this seems to have been in error, thinking it was the cause of failing tests on try. Can't provide much more context than that.
MozReview-Commit-ID: 9h1pXVJeDCG
--HG--
extra : amend_source : 0b5bc70daa03efbee141b31e14c6b23ac35df553
We were missing a possible status in the list for the downloaded
topic. This should be all that we need to get the notification to
show up.
MozReview-Commit-ID: EQSccrdv30Y
--HG--
extra : rebase_source : cc620f08549fb099a82fd1fb4b4aee1c6a124e2f
The NetUtils sync I/O shows up in the profile logs, so we want to switch the
function that loads `update.locale` file to be async.
MozReview-Commit-ID: AEYKiivsNl0
--HG--
extra : rebase_source : 3784a3d40d48e81df41d10eb92b35e1656a0305b
Since the restart itself will clear the restart notification if
it's successful, there's no need to actually dismiss it even on
the main action being executed. Accordingly, this patch changes
it to pass the "dismiss" field to the main action, which will
cause the main action to simply degrade the doorhanger to a
badge.
MozReview-Commit-ID: 5FKTTihIoe4
--HG--
extra : rebase_source : ec9bc2b961bd1c2ec08580d95f0fec06a7f2b437
This reverts the change made in Bug 1375549 where the callback application isn't relaunched when the pid is still present. Since the end result of relaunching when the pid hasn't exited is no worse than not relaunching just go ahead and try to relaunch.
This makes it so updating continue when the parent application doesn't exit (see bug 1375242) so any fixes to the parent application will be applied instead of leaving the client in a broken state.
Changes the wait time for the parent process to 30 seconds since the previous value of 70 seconds was based on nsTerminator which isn't used for this case. It still needs to be greater than the old value of 10 since we've seen cases lately where the process has taken more than 10 seconds.
On OSX, we want the updater to behave the same as when a user
drags a .dmg to the /Applications directory. When the user does
this, OSX does not follow their umask settings, assuming the user
wants to install the application for all users. The updater
should behave similarly.
MozReview-Commit-ID: JXFI9mW9erL
--HG--
extra : rebase_source : b03b38fed9f470dacbd68ad5f439a07cb111231f
Currently we can't differentiate between when a badge is shown
and a doorhanger is shown. This creates an additional problem
where if the badge progresses into a doorhanger after a window of
time has passed, it registers as two notifications shown, when
logically it is one. This splits out badges and doorhangers to
remedy that.
MozReview-Commit-ID: CTTaWDG1tah
--HG--
extra : rebase_source : 2b13b703ac4e12caa040138dadd2875df76ff61a
With these changes the latest update in updates.xml is always the latest update in progress even before applying the update. This makes it so that after a successful update the code in nsBrowserContentHandler.js will always get the correct custom update property.
Tried to do the reverse order (move files then edit), but
reviewboard didn't seem to like me trying to undo what I had
already done. This should at least make the diffs clean though.
MozReview-Commit-ID: Ibcgg2Mc6MT
--HG--
rename : browser/base/content/test/appUpdate/downloadPage.html => toolkit/mozapps/update/tests/browser/downloadPage.html
rename : browser/base/content/test/appUpdate/head.js => toolkit/mozapps/update/tests/browser/head.js
rename : browser/base/content/test/appUpdate/testConstants.js => toolkit/mozapps/update/tests/browser/testConstants.js
extra : rebase_source : db886e032b68f73c561ad7bdaa7e0d4ee4cf0e1a
Since we now have a store of notifications that is global across
all windows, it no longer makes sense to consume the API from
within browser.js. This patch moves the browser.js logic out into
a jsm file that is wired up through nsBrowserGlue, such that it
will be lazily instantiated on the first update event it would
receive[1].
We decided to move this into toolkit, as this piece of the
system is fairly generic and shouldn't differ between
applications.
[1]: There is a change to nsBrowserGlue to use "global[module]"
instead of this[module]. This mirrors the code for all the other
types of notifications, and I suspect it was just a latent bug,
since the original diff that includes this line makes no use of
it.
MozReview-Commit-ID: 8EQdM9BOpgl
--HG--
rename : browser/base/content/test/appUpdate/.eslintrc.js => toolkit/mozapps/update/tests/browser/.eslintrc.js
rename : browser/base/content/test/appUpdate/browser.ini => toolkit/mozapps/update/tests/browser/browser.ini
rename : browser/base/content/test/appUpdate/browser_updatesBackgroundWindow.js => toolkit/mozapps/update/tests/browser/browser_updatesBackgroundWindow.js
rename : browser/base/content/test/appUpdate/browser_updatesBackgroundWindowFailures.js => toolkit/mozapps/update/tests/browser/browser_updatesBackgroundWindowFailures.js
rename : browser/base/content/test/appUpdate/browser_updatesBasicPrompt.js => toolkit/mozapps/update/tests/browser/browser_updatesBasicPrompt.js
rename : browser/base/content/test/appUpdate/browser_updatesBasicPromptNoStaging.js => toolkit/mozapps/update/tests/browser/browser_updatesBasicPromptNoStaging.js
rename : browser/base/content/test/appUpdate/browser_updatesCantApply.js => toolkit/mozapps/update/tests/browser/browser_updatesCantApply.js
rename : browser/base/content/test/appUpdate/browser_updatesCompleteAndPartialPatchesWithBadCompleteSize.js => toolkit/mozapps/update/tests/browser/browser_updatesCompleteAndPartialPatchesWithBadCompleteSize.js
rename : browser/base/content/test/appUpdate/browser_updatesCompleteAndPartialPatchesWithBadPartialSize.js => toolkit/mozapps/update/tests/browser/browser_updatesCompleteAndPartialPatchesWithBadPartialSize.js
rename : browser/base/content/test/appUpdate/browser_updatesCompleteAndPartialPatchesWithBadSizes.js => toolkit/mozapps/update/tests/browser/browser_updatesCompleteAndPartialPatchesWithBadSizes.js
rename : browser/base/content/test/appUpdate/browser_updatesCompletePatchApplyFailure.js => toolkit/mozapps/update/tests/browser/browser_updatesCompletePatchApplyFailure.js
rename : browser/base/content/test/appUpdate/browser_updatesCompletePatchWithBadCompleteSize.js => toolkit/mozapps/update/tests/browser/browser_updatesCompletePatchWithBadCompleteSize.js
rename : browser/base/content/test/appUpdate/browser_updatesDownloadFailures.js => toolkit/mozapps/update/tests/browser/browser_updatesDownloadFailures.js
rename : browser/base/content/test/appUpdate/browser_updatesMalformedXml.js => toolkit/mozapps/update/tests/browser/browser_updatesMalformedXml.js
rename : browser/base/content/test/appUpdate/browser_updatesPartialPatchApplyFailure.js => toolkit/mozapps/update/tests/browser/browser_updatesPartialPatchApplyFailure.js
rename : browser/base/content/test/appUpdate/browser_updatesPartialPatchApplyFailureWithCompleteAvailable.js => toolkit/mozapps/update/tests/browser/browser_updatesPartialPatchApplyFailureWithCompleteAvailable.js
rename : browser/base/content/test/appUpdate/browser_updatesPartialPatchApplyFailureWithCompleteValidationFailure.js => toolkit/mozapps/update/tests/browser/browser_updatesPartialPatchApplyFailureWithCompleteValidationFailure.js
rename : browser/base/content/test/appUpdate/browser_updatesPartialPatchWithBadPartialSize.js => toolkit/mozapps/update/tests/browser/browser_updatesPartialPatchWithBadPartialSize.js
extra : rebase_source : 24048650b23eff0a1da9679d1e9b5e1db1900287
Removes unused gonk code
Changes use of Array.prototype.indexOf(val) != -1 to Array.prototype.includes(val)
Some very minor indentation and logging cleanup
Right now notifications displayed in non-focused windows are
causing that window to be focused. This is annoying. We could work
to make the doorhangers not focus the other windows, but a simpler
solution is to just not show the doorhanger until the window is
focused. This has the added benefit of ensuring that the doorhangers
entry animation is seen by the user, increasing the likelihood that
they will notice it.
Additionally, some existing tests involving extra windows were
refactored. I stripped the old tests of their extra windows and
created new tests specifically to test the behavior of background
windows. These tests were modeled off of the background window
tests of PopupNotifications.jsm, which create a new window knowing
that this will cause the existing window to be the background,
rather than explicitly manipulating the focus of the two windows.
MozReview-Commit-ID: 1fjrDOhEKCw
--HG--
extra : rebase_source : 954ace7e43da90fcee3da2d70c4bdbcda8456d77
Use MOZ_FORMAT_PRINTF in toolkit/mozapps/update, and fix the one
erroneous printf that this detected.
MozReview-Commit-ID: 5dzyMOZwNDG
--HG--
extra : rebase_source : b26942181d52b356702c039bcace11dbf900a3d1