Commit e1e288a3 authored by Aya ElAttar's avatar Aya ElAttar Committed by Commit Bot

Added organization name to the relaunch notification required string on Chrome OS

Bug: 1044716
Change-Id: I43d49a8c1a9033c5c6c1ae184401647b1f821fbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2074884Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Aya Elsayed <ayaelattar@google.com>
Cr-Commit-Position: refs/heads/master@{#744719}
parent 3dc9fce8
......@@ -303,7 +303,7 @@
other {Update within # seconds}}
</message>
<message name="IDS_RELAUNCH_REQUIRED_BODY" desc="The body text of a dialog that tells users the device must be restarted.">
Your organization requires an update to this device
<ph name="organization_name">$1<ex>google.com</ex></ph> requires an update to this device
</message>
<message name="IDS_RELAUNCH_RECOMMENDED_TITLE" desc="The title of a dialog that tells users that a device restart is recommended for an update.">
......
......@@ -7,6 +7,10 @@
#include "ash/public/cpp/update_types.h"
#include "ash/shell.h"
#include "base/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/ui/ash/system_tray_client.h"
#include "chrome/browser/ui/views/relaunch_notification/relaunch_notification_metrics.h"
#include "chrome/browser/ui/views/relaunch_notification/relaunch_required_timer.h"
......@@ -98,10 +102,14 @@ void RelaunchNotificationControllerPlatformImpl::
RefreshRelaunchRequiredTitle() {
// SystemTrayClient may not exist in unit tests.
if (SystemTrayClient::Get()) {
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
SystemTrayClient::Get()->SetUpdateNotificationState(
ash::NotificationStyle::kAdminRequired,
relaunch_required_timer_->GetWindowTitle(),
l10n_util::GetStringUTF16(IDS_RELAUNCH_REQUIRED_BODY));
l10n_util::GetStringFUTF16(
IDS_RELAUNCH_REQUIRED_BODY,
base::UTF8ToUTF16(connector->GetEnterpriseDisplayDomain())));
}
}
......
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