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

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

Issue 2587453002: Chromad: Use different enterprise messaging in tray bubble. (Closed)
Patch Set: Remove braces Created 4 years 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 2e3eb6aa00e0111eac6378ff9aa4e5415db98eab..a0f3f5c12a29efb97e3107c192bfbc7c8036f3d7 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -254,16 +254,9 @@ std::string SystemTrayDelegateChromeOS::GetEnterpriseDomain() const {
return enterprise_domain_;
}
-std::string SystemTrayDelegateChromeOS::GetEnterpriseRealm() const {
- return enterprise_realm_;
-}
-
base::string16 SystemTrayDelegateChromeOS::GetEnterpriseMessage() const {
- 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 (is_active_directory_managed_)
+ return l10n_util::GetStringUTF16(IDS_DEVICE_ENTERPRISE_MANAGED_NOTICE);
if (!GetEnterpriseDomain().empty()) {
return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE,
base::UTF8ToUTF16(GetEnterpriseDomain()));
@@ -870,12 +863,13 @@ void SystemTrayDelegateChromeOS::OnStartBluetoothDiscoverySession(
void SystemTrayDelegateChromeOS::UpdateEnterpriseDomain() {
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
- std::string enterprise_domain = connector->GetEnterpriseDomain();
- std::string enterprise_realm = connector->GetRealm();
- if (enterprise_domain_ != enterprise_domain ||
- enterprise_realm_ != enterprise_realm) {
- enterprise_domain_ = enterprise_domain;
- enterprise_realm_ = enterprise_realm;
+ std::string old_enterprise_domain(std::move(enterprise_domain_));
+ enterprise_domain_ = connector->GetEnterpriseDomain();
+ bool old_is_active_directory_managed = is_active_directory_managed_;
+ is_active_directory_managed_ = connector->IsActiveDirectoryManaged();
+ if ((!is_active_directory_managed_ &&
+ enterprise_domain_ != old_enterprise_domain) ||
+ (is_active_directory_managed_ != old_is_active_directory_managed)) {
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