Commit 077809a4 authored by Aya ElAttar's avatar Aya ElAttar Committed by Commit Bot

Change Defaults of RelaunchNotificationPeriod, RelaunchHeadsUpPeriod, and RelaunchGracePeriod

1.
RelaunchNotificationPeriod	= 	7 days
RelaunchHeadsUpPeriod		= 	3 days
RelaunchGracePeriod             =       60 mins

This will reduce the number of forced reboots, and will them less disruptive.

2. Updating policy_tepmlates.json according to the new defaults.

Bug: 1022419
Change-Id: Ia5ff007cc032a08f8e158e23874039561f1cda24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1904166Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Aya Elsayed <ayaelattar@google.com>
Cr-Commit-Position: refs/heads/master@{#714212}
parent a9559bef
...@@ -57,7 +57,7 @@ class RelaunchNotificationController : public UpgradeObserver { ...@@ -57,7 +57,7 @@ class RelaunchNotificationController : public UpgradeObserver {
// summarily relaunched on Chrome desktop, or the device is rebooted on // summarily relaunched on Chrome desktop, or the device is rebooted on
// Chrome OS. // Chrome OS.
static constexpr base::TimeDelta kRelaunchGracePeriod = static constexpr base::TimeDelta kRelaunchGracePeriod =
base::TimeDelta::FromMinutes(15); base::TimeDelta::FromMinutes(60);
RelaunchNotificationController(UpgradeDetector* upgrade_detector, RelaunchNotificationController(UpgradeDetector* upgrade_detector,
const base::Clock* clock, const base::Clock* clock,
......
...@@ -42,14 +42,12 @@ constexpr base::TimeDelta kNotifyCycleDelta = base::TimeDelta::FromMinutes(20); ...@@ -42,14 +42,12 @@ constexpr base::TimeDelta kNotifyCycleDelta = base::TimeDelta::FromMinutes(20);
// The default amount of time it takes for the detector's annoyance level // The default amount of time it takes for the detector's annoyance level
// (upgrade_notification_stage()) to reach UPGRADE_ANNOYANCE_HIGH once an // (upgrade_notification_stage()) to reach UPGRADE_ANNOYANCE_HIGH once an
// upgrade is detected. // upgrade is detected.
constexpr base::TimeDelta kDefaultHighThreshold = base::TimeDelta::FromDays(4); constexpr base::TimeDelta kDefaultHighThreshold = base::TimeDelta::FromDays(7);
// The default amount of time between the detector's annoyance level change // The default amount of time between the detector's annoyance level change
// from UPGRADE_ANNOYANCE_ELEVATED to UPGRADE_ANNOYANCE_HIGH in ms. // from UPGRADE_ANNOYANCE_ELEVATED to UPGRADE_ANNOYANCE_HIGH in ms.
constexpr int kDefaultHeadsUpPeriodMs = 24 * 60 * 60 * 1000; // 1 day.
constexpr base::TimeDelta kDefaultHeadsUpPeriod = constexpr base::TimeDelta kDefaultHeadsUpPeriod =
base::TimeDelta::FromMilliseconds(kDefaultHeadsUpPeriodMs); base::TimeDelta::FromDays(3); // 3 days.
// The reason of the rollback used in the UpgradeDetector.RollbackReason // The reason of the rollback used in the UpgradeDetector.RollbackReason
// histogram. // histogram.
...@@ -140,7 +138,7 @@ UpgradeDetectorChromeos::~UpgradeDetectorChromeos() {} ...@@ -140,7 +138,7 @@ UpgradeDetectorChromeos::~UpgradeDetectorChromeos() {}
// static // static
void UpgradeDetectorChromeos::RegisterPrefs(PrefRegistrySimple* registry) { void UpgradeDetectorChromeos::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterIntegerPref(prefs::kRelaunchHeadsUpPeriod, registry->RegisterIntegerPref(prefs::kRelaunchHeadsUpPeriod,
kDefaultHeadsUpPeriodMs); kDefaultHeadsUpPeriod.InMilliseconds());
} }
void UpgradeDetectorChromeos::Init() { void UpgradeDetectorChromeos::Init() {
......
...@@ -14859,7 +14859,7 @@ ...@@ -14859,7 +14859,7 @@
Over this time period, the user will be repeatedly informed of the need for an update. For <ph name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> devices, a restart notification appears in the system tray according to the <ph name="RELAUNCH_HEADS_UP_PERIOD_POLICY_NAME">RelaunchHeadsUpPeriod</ph> policy. For <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> browsers, the app menu changes to indicate that a relaunch is needed once one third of the notification period passes. This notification changes color once two thirds of the notification period passes, and again once the full notification period has passed. The additional notifications enabled by the <ph name="RELAUNCH_NOTIFICATION_POLICY_NAME">RelaunchNotification</ph> policy follow this same schedule. Over this time period, the user will be repeatedly informed of the need for an update. For <ph name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> devices, a restart notification appears in the system tray according to the <ph name="RELAUNCH_HEADS_UP_PERIOD_POLICY_NAME">RelaunchHeadsUpPeriod</ph> policy. For <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> browsers, the app menu changes to indicate that a relaunch is needed once one third of the notification period passes. This notification changes color once two thirds of the notification period passes, and again once the full notification period has passed. The additional notifications enabled by the <ph name="RELAUNCH_NOTIFICATION_POLICY_NAME">RelaunchNotification</ph> policy follow this same schedule.
If not set, the default period of 345600000 milliseconds (four days) is used for <ph name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> devices and 604800000 milliseconds (one week) for <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>.''', If not set, the default period of 604800000 milliseconds (one week) is used.''',
}, },
{ {
'id': 567, 'id': 567,
...@@ -14878,7 +14878,7 @@ ...@@ -14878,7 +14878,7 @@
'example_value': 86400000, 'example_value': 86400000,
'desc': '''Allows you to set the time period, in milliseconds, between the first notification that a <ph name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> device must be restarted to apply a pending update and the end of the time period specified by the <ph name="RELAUNCH_NOTIFICATION_PERIOD_POLICY_NAME">RelaunchNotificationPeriod</ph> policy. 'desc': '''Allows you to set the time period, in milliseconds, between the first notification that a <ph name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> device must be restarted to apply a pending update and the end of the time period specified by the <ph name="RELAUNCH_NOTIFICATION_PERIOD_POLICY_NAME">RelaunchNotificationPeriod</ph> policy.
If not set, the default period of 86400000 milliseconds (one day) is used for <ph name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> devices.''', If not set, the default period of 259200000 milliseconds (three days) is used for <ph name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> devices.''',
}, },
{ {
'name': 'VirtualMachinesAllowed', 'name': 'VirtualMachinesAllowed',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment