Closed Bug 595722 Opened 9 years ago Closed 9 years ago

Using this._enabled to make nsIUpdatePrompt not show some of the UI when the app.update.silent pref is set is confusing

Categories

(Toolkit :: Application Update, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla2.0b7

People

(Reporter: rstrong, Assigned: rstrong)

Details

Attachments

(2 files, 2 obsolete files)

spinoff of bug 595059. Instead of using _enabled it should be something like _silenceNotifications.
Attached patch patch in progress (obsolete) — Splinter Review
still need to add tests
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
Attached patch patch in progress (obsolete) — Splinter Review
Attachment #474623 - Attachment is obsolete: true
Attached patch patch rev1Splinter Review
Cleans up the code a little and adds tests for the cases where the silent pref takes affect and when notifications shouldn't be shown because the ui is already displayed.
Attachment #474634 - Attachment is obsolete: true
Attachment #474905 - Flags: review?(dtownsend)
Comment on attachment 474905 [details] [diff] [review]
patch rev1

>diff --git a/toolkit/mozapps/update/nsIUpdateService.idl b/toolkit/mozapps/update/nsIUpdateService.idl
>--- a/toolkit/mozapps/update/nsIUpdateService.idl
>+++ b/toolkit/mozapps/update/nsIUpdateService.idl
>@@ -477,52 +477,64 @@ interface nsIUpdateManager : nsISupports
> /**
>  * An interface describing an object that can show various kinds of Update
>  * notification UI to the user.
>  */
> [scriptable, uuid(599fd3c6-ec68-4499-ada5-2997739c97a6)]
> interface nsIUpdatePrompt : nsISupports
> {
>   /**
>-   * Shows a user interface that checks for and then displays the available
>-   * updates.
>+   * Shows the application update checking user interface and checks if there
>+   * is an update available.
>    */
>   void checkForUpdates();
> 
>   /**
>-   * Show a message advising that an update is available for download and
>-   * install.
>+   * Shows the application update available user interface advising that an
>+   * update is available for download and install. If the app.update.silent
>+   * preference is true or the user interface is already displayed the call will
>+   * be a no-op.
>    * @param   update
>-   *          The update to be downloaded and installed
>+   *          The nsIUpdate object to be downloaded and installed
>    */
>   void showUpdateAvailable(in nsIUpdate update);
> 
>   /**
>-   * Show a message advising that an update has now been downloaded and that
>-   * a restart is necessary to complete the update.
>+   * Show the application update downloaded user interface advising that an

All the rest start with "Shows"

>+   * update has now been downloaded and a restart is necessary to complete the
>+   * update. If background is true (e.g. the download was not user initiated)
>+   * and the app.update.silent preference is true the call will be a no-op.
>+   * download was 

Last line seems to be a mistake
Attachment #474905 - Flags: review?(dtownsend) → review+
Attachment #474905 - Flags: approval2.0+
Pushed to mozilla-central
http://hg.mozilla.org/mozilla-central/rev/0ff0793ff3e6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Flags: in-litmus-
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b6
You need to log in before you can comment on or make changes to this bug.