Privacy/Reviews/OSIdleAPI
Document Overview
Feature/Product: | WebAPI - OS Idle API |
Projected Feature Freeze Date: | (tbd) |
Product Champions: | (Bonnie Surender) |
Privacy Champions: | (the privacy Friend you're working with) |
Security Contact: | Curtis Koenig |
Document State: | [NEW] |
Timeline:
Architectural Overview: | (date TBD) |
Recommendation Meeting: | (date TBD) |
Review Complete ETA: | tbd |
Architecture
In this section, the product's architecture is described. Any individual components or actors are identified, their "knowledge" or what data they store is identified, and data flow between components and external entities is described.
The main objective of this feature/product is: to inform general web content within tabs and windows of the user's idle and active state.
Design Documents: https://bugzilla.mozilla.org/show_bug.cgi?id=715041#c21
Components
Describe any major components in the system and how they interact. Also include any third-party APIs (those Mozilla does not control) and what type of data is sent or received via those APIs.
- Websites
- Web browswer/Firefox
- User
- OS
- Websites
- Websites loaded onto the browser tab within the browswer window or the window itself.
- Web broswer/ Firefox
- When the user stops using the device, i.e. becomes 'idle' the web browser is notified.
- When the user starts using the device again, i.e. becomes 'active' or comes 'back' the browswer is notified.
- The user 'idle' and 'back' status is platform specific.
- On platforms that do NOT support obtaining system idle time, if the user stops using the web browswer but continues to use another application currently executing on the device then the web browser is specifically notified that the user is idle despite the fact that the user is using another application. E.g. Linux, Android.
- The web browswer is notified that the user is 'active'/'back' only when the user specifically interacts with the web browser.
- On platforms that do support obtaining system idle time such as Windows, the web browswer is notified of user idle status only when the user is completely away from the device.
- The web browser is notified that the user is 'active'/ 'back' as soon as the user interacts with any application executing on the device. The user does not need to be directly interfacing with the web browser.
- User
- Use interacting with the device that the browser is currently running on.
Component IdleService
This component receives requests to add and remove idle observers. The global window registers with the idle service as an idle observer. The idle service component notifies the global window of idle and 'back'/active events. The global window performs functions based on the 'idle'/'back' notifications received.
The tables below simply summarize the data encountered by this component.
Stored Data:
Class | nsIObserver |
What | Observer that observes an event corresponding to a topic, in this case 'idle' and 'back' topics. |
Where | xpcom/ds/nsIObserver.idl |
Data type | nsIObserver |
Where stored | an nsIObserver object is stored within an EventListener object |
Communication with Component nsGlobalWindow
Class | "nsGlobalWindow" |
Direction | nsIdleService to nsGlobalWindow and vice-versa |
Message | - nsIdleService sends a topic of 'idle' or 'back' to nsGlobalWindow - nsGlobalWindow requests an add idle observer or remove idle observer from nsIdleService. |
Data | Pointer to a nsIObserver object. |
Notes | None |
Component nsGlobalWindow
This component:
- requests the addition of idle observers to the nsIdleService
- requests the removal of idle observers to the nsIdleService
- receives idle/back/active notifications from the nsIdleService
- interacts with nsIdleService
- maintains a local idle timer that is triggered when an event notification is received from the nsIdleService which then triggers the local timer if there are any local idle observers for that particular global window.
The tables below simply summarize the data encountered by this component.
Stored Data:
class | nsGlobalWindow |
What | - nsTArray of idle observers - one nITimer local timer for idle observers of the global window |
Where | dom/base/nsGlobalWindow |
data type | nsTArray |
where stored | nsGlobalWindow |
Communication with Component IdleService
class | nsGlobalWindow |
Direction | nsGlobalWindow to nsIdleService |
Message | Add/remove idle observer |
Data | pointer to nsIObserver observer object. |
Notes | None |
This component receives a request from the frontend javascript test to register/add and remove idle observers which passes an idle time, a callback function when the user is idle and a callback function when the user is active.
The tables below simply summarize the data encountered by this component.
Stored Data: None
Communication with Component nsGlobalWindow
class | nsGlobalWindow |
Direction | Navigator to nsGlobalWindow |
Message | add/remove idle observer from Navigator to nsGlobalWindow. |
Data | nsIObserver object. |
Notes | None |
User Data Risk Minimization
In this section, the privacy champion will identify areas of user data risk and recommendations for minimizing the risk.
Alignment with Privacy Operating Principles
In this section, the privacy champion will identify how the feature lines up with Mozilla's privacy operating principles.
See Also: Privacy/Roadmap_2011#Operating_Principles:
Principle: Transparency / No Surprises
(How the feature addresses this)
Recommendations: (what can be improved)
Principle: Real Choice
Recommendations:
Principle: Sensible Defaults
Recommendations:
Principle: Limited Data
Recommendations:
Follow-up Tasks and tracking
What | Who | Bug | Details |
---|---|---|---|
[NEW] Initial Overview Discussion | Bonnie Surender, Jonas Sicking | Meeting time TBD |