README.md
1# Relaunch Notifications Overview
2
3This document is an overview of relaunch notifications concepts, terms, and
4architecture.
5
6## Key Classes
7
8### RelaunchNotificationController
9
10An instance of class RelaunchNotificationController observes `UpgradeDetector`
11and controls the notifications shown to the user according to the
12RelaunchNotification and RelaunchNotificationPeriod policies settings.
13An instance of this class is owned by `ChromeBrowserMainExtraPartsViews`, and
14only one instance is created per browser.
15
16### RelaunchNotificationControllerPlatformImpl
17
18An instance of this class represents the implementation of
19RelaunchNotificationController according to specific platforms; Chrome OS,
20Desktop.
21The relaunch notification on Chrome OS is used to relaunch the whole operating
22system to apply updates, but on other platforms is used to only relaunch the
23browser to update it.
24
25### RelaunchRequiredTimer
26
27An instance of this class is responsible for refreshing the title for relaunch
28notification in case `RelaunchNotification` policy is set to required.
29The notification title needs to be refreshed as it displays the remaining time
30for the relaunch.
31
32### **Desktop Chrome**
33
34#### RelaunchRecommendedBubbleView
35
36If the policy setting is recommended, then an instance of this class manages
37the relaunch recommended notification bubble on desktop Chrome. The remaining
38time until the next recommended relaunch is displayed in the title.
39
40#### RelaunchRecommendedTimer
41
42An instance of this class is responsible for refreshing the title for
43RelaunchRecommendedBubbleView on desktop Chrome.
44
45#### RelaunchRequiredDialogView
46
47If the policy setting is required, then an instance of this class manages the
48relaunch required dialog on desktop Chrome. The remaining time until the next
49required relaunch is displayed in the title.
50
51### **Chrome OS**
52
53The relaunch notifications on Chrome OS uses `SystemTray` notifications, and
54uses `RelaunchRequiredTimer` to update the title in case the
55`RelaunchNotification` policy is set to required.
56
57
58## Metrics
59
60`relaunch_notification::RecordRecommendedShowResult` is responsible for
61recording UMA metrics of the notification showing result in case the
62notification settings was set to recommended.
63
64`relaunch_notification::RecordRequiredShowResult` is responsible for
65recording UMA metrics of the notification showing result in case the
66notification settings was set to required.
67