Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 2491623003: Show realm in device owner notice (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index 4d3f7de50b42cfd274d6262ecbc669703226ca78..19fff6d9fb7c3c5e1dd18caacaf3ce8ce6da93ca 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -276,11 +276,21 @@ std::string SystemTrayDelegateChromeOS::GetEnterpriseDomain() const {
return enterprise_domain_;
}
+std::string SystemTrayDelegateChromeOS::GetEnterpriseRealm() const {
+ return enterprise_realm_;
+}
+
base::string16 SystemTrayDelegateChromeOS::GetEnterpriseMessage() const {
- if (GetEnterpriseDomain().empty())
- return base::string16();
- return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE,
- base::UTF8ToUTF16(GetEnterpriseDomain()));
+ if (!GetEnterpriseRealm().empty()) {
+ // TODO(rsorokin): Maybe change a message for the Active Directory devices.
+ return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE,
+ base::UTF8ToUTF16(GetEnterpriseRealm()));
+ }
+ if (!GetEnterpriseDomain().empty()) {
+ return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE,
+ base::UTF8ToUTF16(GetEnterpriseDomain()));
+ }
+ return base::string16();
}
std::string SystemTrayDelegateChromeOS::GetSupervisedUserManager() const {
@@ -964,8 +974,11 @@ void SystemTrayDelegateChromeOS::UpdateEnterpriseDomain() {
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
std::string enterprise_domain = connector->GetEnterpriseDomain();
- if (enterprise_domain_ != enterprise_domain) {
+ std::string enterprise_realm = connector->GetRealm();
+ if (enterprise_domain_ != enterprise_domain ||
+ enterprise_realm_ != enterprise_realm) {
enterprise_domain_ = enterprise_domain;
+ enterprise_realm_ = enterprise_realm;
GetSystemTrayNotifier()->NotifyEnterpriseDomainChanged();
}
}
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698