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.
Component IdleService
This component receives requests to register/add and remove idle observers. It has a timers that notify the registered idle observers. The global window registers with the idle service as an idle observer. The idle service component notifies (interacts with) the global window of an idle or '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 | nsIdleService |
What | Idle Service notifier |
Where | /widget/xpwidgets/nsIdleService.cpp |
data type | nsIObserver, EventListener, |
where stored | an nsIObserver object is stored within an EventListener object, that is stored in an nsTArray. |
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 | |||||
In: | message 1 | - | nsGlobalWindow requests an add idle observer or remove idle observer from nsIdleService. A pointer to the nsIObserver object that is being added or removed is sent to the nsIdleObserver. | ||
Out: | message 2 | - nsIdleService to nsGlobalWindow, data sent is a string called topic which is either "idle" or "active". |
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:
What: - nsTArray of idle observers | - one nITimer local timer for idle observers of the global window | Where: dom/base/nsGlobalWindow |
---|---|---|
data type | where stored |
Communication with Component IdleService
Direction: nsGlobalWindow to nsIdleService | Message: Add/remove idle observer | Data: pointer to nsIObserver observer object. | Notes: None |
---|---|---|---|
In: | message 1 | Add/remove idle observer with a pointer to the nsIObserver object. | |
Out: | message 2 | 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:
What: Navigator | Where: /dom/base/Navigator.cpp |
---|---|
data type: nsIObserver | where stored: not applicable |
Communication with Component nsGlobalWindow
Direction: Navigator to nsGlobalWindow | Message: add/remove idle observer from Navigator to nsGlobalWindow. | Data: nsIObserver object. | Notes: None | |
---|---|---|---|---|
In: | message 1: Navigator receives requests to add/remove idle observers. | |||
Out: | message 2: Navigator requests an add/remove idle observers. |
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 |