summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordzhioev@chromium.org <dzhioev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-15 22:40:43 +0000
committerdzhioev@chromium.org <dzhioev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-15 22:40:43 +0000
commitf69afe334b1a8b82b5d9a6ac471706222e6c6c1c (patch)
tree69e4a7fe7f7bf2763d0e5ee29ddff3e7eeff8466
parentcd54999a1c3188ad9830a7d13be811dd3ca12768 (diff)
downloadchromium_src-f69afe334b1a8b82b5d9a6ac471706222e6c6c1c.zip
chromium_src-f69afe334b1a8b82b5d9a6ac471706222e6c6c1c.tar.gz
chromium_src-f69afe334b1a8b82b5d9a6ac471706222e6c6c1c.tar.bz2
Changed notifications for enterprise enrolled devices.
This changelist removes notification bar from login screen and adds notifications to GAIA-screen and new tab in Guest session. TBR=akalin BUG=chromium-os:35755 Review URL: https://chromiumcodereview.appspot.com/11522004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173336 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/chromeos_strings.grdp7
-rw-r--r--chrome/browser/chromeos/login/version_info_updater.cc28
-rw-r--r--chrome/browser/chromeos/login/version_info_updater.h6
-rw-r--r--chrome/browser/resources/chromeos/guest_session_tab.html14
-rw-r--r--chrome/browser/resources/chromeos/login/display_manager.js10
-rw-r--r--chrome/browser/resources/chromeos/login/enterprise_info.css31
-rw-r--r--chrome/browser/resources/chromeos/login/enterprise_info.html6
-rw-r--r--chrome/browser/resources/chromeos/login/login.html2
-rw-r--r--chrome/browser/resources/chromeos/login/login.js5
-rw-r--r--chrome/browser/resources/chromeos/login/notification_area.html10
-rw-r--r--chrome/browser/resources/chromeos/login/oobe.html2
-rw-r--r--chrome/browser/resources/chromeos/login/oobe.js5
-rw-r--r--chrome/browser/resources/chromeos/login/screen_gaia_signin.css18
-rw-r--r--chrome/browser/resources/chromeos/login/screen_gaia_signin.html3
-rw-r--r--chrome/browser/resources/chromeos/login/screen_gaia_signin.js1
-rw-r--r--chrome/browser/sync/profile_sync_service.h2
-rw-r--r--chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc10
-rw-r--r--chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h3
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_resource_cache.cc23
19 files changed, 117 insertions, 69 deletions
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp
index 6243be6..4b13dfa 100644
--- a/chrome/app/chromeos_strings.grdp
+++ b/chrome/app/chromeos_strings.grdp
@@ -3458,11 +3458,8 @@ Battery full
<message name="IDS_LOGIN_VERSION_LABEL_FORMAT" desc="Login screen version text format.">
<ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> <ph name="PRODUCT_VERSION">$2<ex>15.0.0.0</ex></ph> (Platform <ph name="PLATFORM_VERSION">$3<ex>900.0-11.09.01</ex></ph>)
</message>
- <message name="IDS_LOGIN_MANAGED_BY_NOTICE" desc="Text for the notification bar on the login screen showing that this is a managed device.">
- This device is managed by <ph name="DOMAIN">$1<ex>yourdomain.com</ex></ph>.
- </message>
- <message name="IDS_LOGIN_MANAGED_REPORTING_HINT" desc="Text for the hint on reporting features displayed in the enterprise notification bar on the login screen.">
- Device usage may be tracked.
+ <message name="IDS_DEVICE_OWNED_BY_NOTICE" desc="Text for notifications showing that this is managed device.">
+ This device is owned by <ph name="DOMAIN">$1<ex>acmecorp.com</ex></ph>.
</message>
<message name="IDS_LOGIN_PUBLIC_ACCOUNT_INFO_FORMAT" desc="Template for text shown in the public account user pod, informing the user that this is a public, managed account.">
This device is owned by <ph name="DOMAIN">$1<ex>yourdomain.com</ex></ph> and will be used by others after you.
diff --git a/chrome/browser/chromeos/login/version_info_updater.cc b/chrome/browser/chromeos/login/version_info_updater.cc
index 92bd19e..6f3c214 100644
--- a/chrome/browser/chromeos/login/version_info_updater.cc
+++ b/chrome/browser/chromeos/login/version_info_updater.cc
@@ -42,8 +42,7 @@ const char* kReportingFlags[] = {
// VersionInfoUpdater public:
VersionInfoUpdater::VersionInfoUpdater(Delegate* delegate)
- : enterprise_reporting_hint_(false),
- cros_settings_(chromeos::CrosSettings::Get()),
+ : cros_settings_(chromeos::CrosSettings::Get()),
delegate_(delegate) {
}
@@ -127,26 +126,13 @@ void VersionInfoUpdater::UpdateVersionLabel() {
}
void VersionInfoUpdater::UpdateEnterpriseInfo() {
- bool reporting_hint = false;
- for (unsigned int i = 0; i < arraysize(kReportingFlags); ++i) {
- bool enabled = false;
- if (cros_settings_->GetBoolean(kReportingFlags[i], &enabled) && enabled) {
- reporting_hint = true;
- break;
- }
- }
-
SetEnterpriseInfo(
- g_browser_process->browser_policy_connector()->GetEnterpriseDomain(),
- reporting_hint);
+ g_browser_process->browser_policy_connector()->GetEnterpriseDomain());
}
-void VersionInfoUpdater::SetEnterpriseInfo(const std::string& domain_name,
- bool reporting_hint) {
- if (domain_name != enterprise_domain_text_ ||
- reporting_hint != enterprise_reporting_hint_) {
+void VersionInfoUpdater::SetEnterpriseInfo(const std::string& domain_name) {
+ if (domain_name != enterprise_domain_text_) {
enterprise_domain_text_ = domain_name;
- enterprise_reporting_hint_ = reporting_hint;
UpdateVersionLabel();
// Update the notification about device status reporting.
@@ -154,9 +140,9 @@ void VersionInfoUpdater::SetEnterpriseInfo(const std::string& domain_name,
std::string enterprise_info;
if (!domain_name.empty()) {
enterprise_info = l10n_util::GetStringFUTF8(
- IDS_LOGIN_MANAGED_BY_NOTICE,
- UTF8ToUTF16(enterprise_domain_text_));
- delegate_->OnEnterpriseInfoUpdated(enterprise_info, reporting_hint);
+ IDS_DEVICE_OWNED_BY_NOTICE,
+ UTF8ToUTF16(domain_name));
+ delegate_->OnEnterpriseInfoUpdated(enterprise_info);
}
}
}
diff --git a/chrome/browser/chromeos/login/version_info_updater.h b/chrome/browser/chromeos/login/version_info_updater.h
index dff0146..4717686 100644
--- a/chrome/browser/chromeos/login/version_info_updater.h
+++ b/chrome/browser/chromeos/login/version_info_updater.h
@@ -37,8 +37,7 @@ class VersionInfoUpdater : public policy::CloudPolicySubsystem::Observer,
// Called when the enterprise info notice should be updated.
virtual void OnEnterpriseInfoUpdated(
- const std::string& enterprise_info,
- bool reporting_hint) = 0;
+ const std::string& enterprise_info) = 0;
};
explicit VersionInfoUpdater(Delegate* delegate);
@@ -74,7 +73,7 @@ class VersionInfoUpdater : public policy::CloudPolicySubsystem::Observer,
void UpdateEnterpriseInfo();
// Set enterprise domain name.
- void SetEnterpriseInfo(const std::string& domain_name, bool reporting_hint);
+ void SetEnterpriseInfo(const std::string& domain_name);
// Callback from chromeos::VersionLoader giving the version.
void OnVersion(const std::string& version);
@@ -93,7 +92,6 @@ class VersionInfoUpdater : public policy::CloudPolicySubsystem::Observer,
// Information pieces for version label.
std::string version_text_;
std::string enterprise_domain_text_;
- bool enterprise_reporting_hint_;
// Full text for the OS version label.
std::string os_version_label_text_;
diff --git a/chrome/browser/resources/chromeos/guest_session_tab.html b/chrome/browser/resources/chromeos/guest_session_tab.html
index 736d1cd..6f73e72 100644
--- a/chrome/browser/resources/chromeos/guest_session_tab.html
+++ b/chrome/browser/resources/chromeos/guest_session_tab.html
@@ -3,6 +3,7 @@
<head>
<title i18n-content="title"></title>
<link rel="stylesheet" href="../incognito_tab.css">
+<link rel="stylesheet" href="login/enterprise_info.css">
<script>
// Until themes can clear the cache, force-reload the theme stylesheet.
document.write('<link id="incognitothemecss" rel="stylesheet" ' +
@@ -10,8 +11,16 @@ document.write('<link id="incognitothemecss" rel="stylesheet" ' +
Date.now() + '">');
</script>
</head>
-<body>
-<div class="content" i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
+<body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
+<div id="enterprise-info" location="guest-tab"
+ i18n-values="visible:enterpriseInfoVisible;">
+ <img src="chrome://theme/IDR_CONTROLLED_SETTING_MANDATORY"/>
+ <span id="enterprise-info-message" i18n-content="enterpriseInfoMessage">
+ </span>
+ <a id="enterprise-info-hint-link" i18n-content="learnMore"
+ i18n-values=".href:enterpriseInfoHintLink"></a>
+</div>
+<div class="content" >
<span i18n-values=".innerHTML:content"></span>
</div>
</body>
@@ -22,3 +31,4 @@ function themeChanged() {
}
</script>
</html>
+
diff --git a/chrome/browser/resources/chromeos/login/display_manager.js b/chrome/browser/resources/chromeos/login/display_manager.js
index 5bd663f..98e7bcf 100644
--- a/chrome/browser/resources/chromeos/login/display_manager.js
+++ b/chrome/browser/resources/chromeos/login/display_manager.js
@@ -474,7 +474,7 @@ cr.define('cr.ui.login', function() {
* Initializes display manager.
*/
DisplayManager.initialize = function() {
- var link = $('enterprise-reporting-hint-link');
+ var link = $('enterprise-info-hint-link');
link.addEventListener(
'click', DisplayManager.handleEnterpriseHintLinkClick);
},
@@ -615,15 +615,11 @@ cr.define('cr.ui.login', function() {
/**
* Sets the text content of the enterprise info message.
* @param {string} messageText The message text.
- * @param {boolean} showReportingHint Whether to show the reporting warning.
*/
- DisplayManager.setEnterpriseInfo = function(messageText, showReportingHint) {
+ DisplayManager.setEnterpriseInfo = function(messageText) {
$('enterprise-info-message').textContent = messageText;
if (messageText) {
- $('enterprise-info-container').hidden = false;
- if (showReportingHint) {
- $('enterprise-reporting-hint-container').hidden = false;
- }
+ $('enterprise-info').hidden = false;
}
};
diff --git a/chrome/browser/resources/chromeos/login/enterprise_info.css b/chrome/browser/resources/chromeos/login/enterprise_info.css
new file mode 100644
index 0000000..2b67520
--- /dev/null
+++ b/chrome/browser/resources/chromeos/login/enterprise_info.css
@@ -0,0 +1,31 @@
+/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ *
+ * This is the stylesheet used for notifications in enterprise-enrolled devices.
+ */
+
+#enterprise-info {
+ background-color: rgb(250, 245, 202);
+ border: 2px solid rgb(250, 245, 202);
+ border-radius: 2px;
+ margin-left: auto;
+ margin-right: auto;
+ padding: 3px 8px 7px;
+}
+
+#enterprise-info[location='guest-tab'] {
+ margin-bottom: -49px;
+ max-width: 600px;
+}
+
+#enterprise-info[visible='false'] {
+ display: none;
+}
+
+#enterprise-info img {
+ -webkit-margin-end: 4px;
+ position: relative;
+ top: 3px;
+}
+
diff --git a/chrome/browser/resources/chromeos/login/enterprise_info.html b/chrome/browser/resources/chromeos/login/enterprise_info.html
new file mode 100644
index 0000000..6727e3c00a
--- /dev/null
+++ b/chrome/browser/resources/chromeos/login/enterprise_info.html
@@ -0,0 +1,6 @@
+<div id="enterprise-info" hidden>
+ <img src="chrome://theme/IDR_CONTROLLED_SETTING_MANDATORY"/>
+ <span id="enterprise-info-message"></span>
+ <a id="enterprise-info-hint-link" href="#" i18n-content="learnMore"></a>
+</div>
+
diff --git a/chrome/browser/resources/chromeos/login/login.html b/chrome/browser/resources/chromeos/login/login.html
index 1cc217e..f99cb72 100644
--- a/chrome/browser/resources/chromeos/login/login.html
+++ b/chrome/browser/resources/chromeos/login/login.html
@@ -8,6 +8,7 @@
<link rel="stylesheet" href="chrome://resources/css/widgets.css">
<link rel="stylesheet" href="bubble.css">
<link rel="stylesheet" href="butter_bar.css">
+<link rel="stylesheet" href="enterprise_info.css">
<link rel="stylesheet" href="header_bar.css">
<link rel="stylesheet" href="network_dropdown.css">
<link rel="stylesheet" href="oobe.css">
@@ -52,7 +53,6 @@
<div id="background" class="background-initial"></div>
<include src="version.html">
<div id="outer-container">
- <include src="notification_area.html">
<div id="oobe" class="faded">
<div id="header">
<span i18n-content="productName"></span>
diff --git a/chrome/browser/resources/chromeos/login/login.js b/chrome/browser/resources/chromeos/login/login.js
index a3695b0..e83d190 100644
--- a/chrome/browser/resources/chromeos/login/login.js
+++ b/chrome/browser/resources/chromeos/login/login.js
@@ -207,10 +207,9 @@ cr.define('cr.ui', function() {
* Sets the text content of the enterprise info message.
* If the text is empty, the entire notification will be hidden.
* @param {string} messageText The message text.
- * @param {boolean} showTrackingHint Whether to show the reporting warning.
*/
- Oobe.setEnterpriseInfo = function(messageText, showReportingWarning) {
- DisplayManager.setEnterpriseInfo(messageText, showReportingWarning);
+ Oobe.setEnterpriseInfo = function(messageText) {
+ DisplayManager.setEnterpriseInfo(messageText);
};
// Export
diff --git a/chrome/browser/resources/chromeos/login/notification_area.html b/chrome/browser/resources/chromeos/login/notification_area.html
deleted file mode 100644
index 189b429..0000000
--- a/chrome/browser/resources/chromeos/login/notification_area.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<div id="notification-area">
- <div id="enterprise-info-container" class="butter-bar" hidden>
- <span id="enterprise-info-message"></span>
- <span id="enterprise-reporting-hint-container" hidden>
- <span i18n-content="reportingHint"></span>
- <a id="enterprise-reporting-hint-link" href="#"
- i18n-content="learnMore"></a>
- </span>
- </div>
-</div>
diff --git a/chrome/browser/resources/chromeos/login/oobe.html b/chrome/browser/resources/chromeos/login/oobe.html
index 6f76e23..c230756 100644
--- a/chrome/browser/resources/chromeos/login/oobe.html
+++ b/chrome/browser/resources/chromeos/login/oobe.html
@@ -10,6 +10,7 @@
<link rel="stylesheet" href="bubble.css">
<link rel="stylesheet" href="butter_bar.css">
<link rel="stylesheet" href="header_bar.css">
+<link rel="stylesheet" href="enterprise_info.css">
<link rel="stylesheet" href="network_dropdown.css">
<link rel="stylesheet" href="oobe.css">
<link rel="stylesheet" href="screen_account_picker.css">
@@ -56,7 +57,6 @@
<div id="background" class="background-initial"></div>
<include src="version.html">
<div id="outer-container">
- <include src="notification_area.html">
<div id="oobe" class="faded">
<div id="header">
<span i18n-content="productName"></span>
diff --git a/chrome/browser/resources/chromeos/login/oobe.js b/chrome/browser/resources/chromeos/login/oobe.js
index 81eff5a..4e992f3 100644
--- a/chrome/browser/resources/chromeos/login/oobe.js
+++ b/chrome/browser/resources/chromeos/login/oobe.js
@@ -450,10 +450,9 @@ cr.define('cr.ui', function() {
* Sets the text content of the enterprise info message.
* If the text is empty, the entire notification will be hidden.
* @param {string} messageText The message text.
- * @param {boolean} showTrackingHint Whether to show the reporting warning.
*/
- Oobe.setEnterpriseInfo = function(messageText, showReportingWarning) {
- DisplayManager.setEnterpriseInfo(messageText, showReportingWarning);
+ Oobe.setEnterpriseInfo = function(messageText) {
+ DisplayManager.setEnterpriseInfo(messageText);
};
// Export
diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.css b/chrome/browser/resources/chromeos/login/screen_gaia_signin.css
index f20a879..950389a 100644
--- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.css
+++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.css
@@ -11,11 +11,15 @@ html[oobe=old] #gaia-signin {
}
#signin-right {
- font-size: 12px;
top: 60px;
width: 200px;
}
+#signin-right,
+#enterprise-info-container {
+ font-size: 12px;
+}
+
html[oobe=old] #signin-right {
position: absolute;
}
@@ -91,3 +95,15 @@ html[oobe=new] .no-right-panel #signin-frame {
visibility: hidden;
z-index: -1;
}
+
+#enterprise-info-container {
+ bottom: 10px;
+ left: 0;
+ position: absolute;
+ right: 0;
+ text-align: center;
+}
+
+#enterprise-info-container #enterprise-info {
+ display: inline-block;
+}
diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.html b/chrome/browser/resources/chromeos/login/screen_gaia_signin.html
index e52aa5e7..5b71fab 100644
--- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.html
+++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.html
@@ -19,4 +19,7 @@
<div id="gaia-loading" class="step-loading">
<div class="spinner"></div>
</div>
+ <div id="enterprise-info-container" hidden>
+ <include src="enterprise_info.html">
+ </div>
</div>
diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
index 7354e92..167be5c 100644
--- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
+++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
@@ -105,6 +105,7 @@ cr.define('login', function() {
$('gaia-loading').hidden = !show;
this.frame_.hidden = show;
$('signin-right').hidden = show;
+ $('enterprise-info-container').hidden = show;
},
/**
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 915d706..feca8f7 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -450,7 +450,7 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// dpending on the type's current status.
//
// This function is used by sync_ui_util.cc to help populate the about:sync
- // page. It returns a ListValue rather than a DictionaryValye in part to make
+ // page. It returns a ListValue rather than a DictionaryValue in part to make
// it easier to iterate over its elements when constructing that page.
Value* GetTypeStatusMap() const;
diff --git a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
index 3001b05..82784e49 100644
--- a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
@@ -70,9 +70,6 @@ void CoreOobeHandler::GetLocalizedStrings(
"productName", l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME));
localized_strings->SetString(
"learnMore", l10n_util::GetStringUTF16(IDS_LEARN_MORE));
- localized_strings->SetString(
- "reportingHint",
- l10n_util::GetStringUTF16(IDS_LOGIN_MANAGED_REPORTING_HINT));
// OOBE accessibility options menu strings shown on each screen.
localized_strings->SetString("accessibilityLink",
@@ -213,13 +210,10 @@ void CoreOobeHandler::OnBootTimesLabelTextUpdated(
}
void CoreOobeHandler::OnEnterpriseInfoUpdated(
- const std::string& message_text,
- bool reporting_hint) {
+ const std::string& message_text) {
base::StringValue message_text_vaue(UTF8ToUTF16(message_text));
- base::FundamentalValue show_help_link(reporting_hint);
web_ui()->CallJavascriptFunction("cr.ui.Oobe.setEnterpriseInfo",
- message_text_vaue,
- show_help_link);
+ message_text_vaue);
}
void CoreOobeHandler::UpdateLabel(const std::string& id,
diff --git a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h
index b3859ac..0c087f0 100644
--- a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h
@@ -48,8 +48,7 @@ class CoreOobeHandler : public BaseScreenHandler,
virtual void OnBootTimesLabelTextUpdated(
const std::string& boot_times_label_text) OVERRIDE;
virtual void OnEnterpriseInfoUpdated(
- const std::string& message_text,
- bool reporting_hint) OVERRIDE;
+ const std::string& message_text) OVERRIDE;
// Show or hide OOBE UI.
void ShowOobeUI(bool show);
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 94f0bef..4a1bef5 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -15,8 +15,10 @@
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/google/google_util.h"
+#include "chrome/browser/policy/browser_policy_connector.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/profile_sync_service.h"
@@ -74,6 +76,10 @@ const char kLearnMoreIncognitoUrl[] =
const char kLearnMoreGuestSessionUrl[] =
"https://www.google.com/support/chromeos/bin/answer.py?answer=1057090";
+// The URL for the Learn More page about enterprise enrolled devices
+const char kLearnMoreEnterpriseUrl[] =
+ "https://www.google.com/support/chromeos/bin/answer.py?answer=2535613";
+
// The URL for bookmark sync service help.
const char kSyncServiceHelpUrl[] =
"https://www.google.com/support/chrome/bin/answer.py?answer=165139";
@@ -265,6 +271,23 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() {
new_tab_message_ids = IDS_NEW_TAB_GUEST_SESSION_MESSAGE;
new_tab_html_idr = IDR_GUEST_SESSION_TAB_HTML;
new_tab_link = kLearnMoreGuestSessionUrl;
+
+ std::string enterprise_domain =
+ g_browser_process->browser_policy_connector()->GetEnterpriseDomain();
+ if (!enterprise_domain.empty()) {
+ // Device is enterprise enrolled.
+ localized_strings.SetString("enterpriseInfoVisible", "true");
+ string16 enterprise_info = l10n_util::GetStringFUTF16(
+ IDS_DEVICE_OWNED_BY_NOTICE,
+ UTF8ToUTF16(enterprise_domain));
+ localized_strings.SetString("enterpriseInfoMessage", enterprise_info);
+ localized_strings.SetString("learnMore",
+ l10n_util::GetStringUTF16(IDS_LEARN_MORE));
+ localized_strings.SetString("enterpriseInfoHintLink",
+ GetUrlWithLang(GURL(kLearnMoreEnterpriseUrl)));
+ } else {
+ localized_strings.SetString("enterpriseInfoVisible", "false");
+ }
}
#endif
localized_strings.SetString("content",