diff options
9 files changed, 74 insertions, 30 deletions
diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h index 45b0c71..6c76b57 100644 --- a/ash/system/tray/system_tray_delegate.h +++ b/ash/system/tray/system_tray_delegate.h @@ -136,10 +136,11 @@ class SystemTrayDelegate { // Returns notification for enterprise enrolled devices. virtual const base::string16 GetEnterpriseMessage() const = 0; - // Returns the email of user that manages current locally managed user. + // Returns the display email of user that manages current + // locally managed user. virtual const std::string GetLocallyManagedUserManager() const = 0; - // Returns the email of user that manages current locally managed user. + // Returns the name of user that manages current locally managed user. virtual const base::string16 GetLocallyManagedUserManagerName() const = 0; // Returns notification for locally managed users. diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp index 027556d..5af0160 100644 --- a/chrome/app/chromeos_strings.grdp +++ b/chrome/app/chromeos_strings.grdp @@ -471,6 +471,15 @@ Press any key to continue exploring. <message name="IDS_CREATE_LOCALLY_MANAGED_USER_NO_MANAGER_TEXT" desc="Text shown when supervised user can be created, but no users that can be manager exist."> At least one account must exist on this device before creating a supervised user. </message> + <message name="IDS_CREATE_LOCALLY_MANAGED_INTRO_TEXT_TITLE" desc="Supervised user dialog, intro page, title"> + What is a supervised user? + </message> + <message name="IDS_CREATE_LOCALLY_MANAGED_INTRO_ALTERNATE_TEXT" desc="Supervised user dialog, intro page, first paragraph"> + A supervised user can explore the web with your guidance. As the manager of a supervised user, you can + <ph name="BEGIN_BOLD"><strong></ph>allow or prohibit<ph name="END_BOLD"></strong></ph> certain websites, + <ph name="BEGIN_BOLD"><strong></ph>review<ph name="END_BOLD"></strong></ph> websites the supervised user has visited, and + <ph name="BEGIN_BOLD"><strong></ph>manage<ph name="END_BOLD"></strong></ph> other settings. + </message> <message name="IDS_CREATE_LOCALLY_MANAGED_INTRO_TEXT_1" desc="Supervised user dialog, intro page, first paragraph"> A supervised user can explore the web with your guidance. As the manager of a supervised user in Chrome, you can: </message> @@ -485,8 +494,7 @@ Press any key to continue exploring. </message> <message name="IDS_CREATE_LOCALLY_MANAGED_INTRO_TEXT_2" desc="Supervised user dialog, intro page, second paragraph"> Creating a supervised user does not create a Google Account, and their settings - and data will not follow them to other devices with Chrome Sync. Currently, - a supervised user applies only to this installation of Chrome, on this device. + and data will not follow them to other devices with Chrome Sync. A supervised user applies only to this device. </message> <message name="IDS_CREATE_LOCALLY_MANAGED_INTRO_TEXT_3" desc="Supervised user dialog, intro page, third paragraph"> After you create a new supervised user, you can manage the settings at any time from any device at <ph name="MANAGEMENT_URL">$1<ex>www.example.com</ex></ph>. @@ -501,7 +509,7 @@ Press any key to continue exploring. Enter password </message> <message name="IDS_CREATE_LOCALLY_MANAGED_USER_CREATE_ACCOUNT_NAME_TITLE" desc="Supervised user dialog, new user page, title for name of new user"> - Create an name - + Create a name - </message> <message name="IDS_CREATE_LOCALLY_MANAGED_USER_CREATE_ACCOUNT_NAME_EXPLANATION" desc="Supervised user dialog, new user page, explanation for name of new user"> This supervised user will be managed by <ph name="MANAGER_EMAIL">$1<ex>john.doe@example.com</ex></ph>. @@ -596,16 +604,19 @@ Press any key to continue exploring. Retry </message> <message name="IDS_CREATE_LOCALLY_MANAGED_USER_CREATION_AUTH_PROGRESS_MESSAGE" desc="Text shown next to progress indicator upon manager authentication."> - Authenticating... + Authenticating </message> <message name="IDS_CREATE_LOCALLY_MANAGED_USER_CREATION_CREATION_PROGRESS_MESSAGE" desc="Text shown next to progress indicator upon supervised user creation."> - Creating profile... + Creating supervised user </message> <message name="IDS_CREATE_LOCALLY_MANAGED_USER_CREATION_CREATION_TIMEOUT_MESSAGE" desc="Text shown at the place of progess indicator if creation takes too long and should be cancelled."> Profile takes too long to create. You may want to cancel process and retry later. </message> <message name="IDS_USER_IS_LOCALLY_MANAGED_BY_NOTICE" desc="Text for notifications showing that this user is locally managed"> - This supervised user is managed by <ph name="USER_DISPLAY_NAME">$1<ex>John</ex></ph>. Usage and browsing history can be viewed by the manager. + This user is supervised by <ph name="MANAGER_EMAIL">$1<ex>user@example.com</ex></ph>. Usage and history from this user can be reviewed by the manager on chrome.com. + </message> + <message name="IDS_SUPERVISED_USER_EXPIRED_TOKEN_WARNING" desc="Warning text that is shown on login screen trying to sign in as a supervised user that has expired token"> + This supervised user may have been deleted or disabled by the manager. Please contact the manager if you would like to continue signing in as this user. </message> <message name="IDS_LOGIN_POD_USER_REMOVE_WARNING" desc="Text shown as a warning when attempting to remove supervised user."> All files and local data associated with the supervised user will be permanently diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc index 764b81e..7a8a0fa 100644 --- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc +++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc @@ -463,8 +463,9 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, virtual const string16 GetLocallyManagedUserMessage() const OVERRIDE { if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED) return string16(); - return l10n_util::GetStringFUTF16(IDS_USER_IS_LOCALLY_MANAGED_BY_NOTICE, - GetLocallyManagedUserManagerName()); + return l10n_util::GetStringFUTF16( + IDS_USER_IS_LOCALLY_MANAGED_BY_NOTICE, + UTF8ToUTF16(GetLocallyManagedUserManager())); } virtual bool SystemShouldUpgrade() const OVERRIDE { diff --git a/chrome/browser/managed_mode/managed_user_service.cc b/chrome/browser/managed_mode/managed_user_service.cc index 90ad387..824978d 100644 --- a/chrome/browser/managed_mode/managed_user_service.cc +++ b/chrome/browser/managed_mode/managed_user_service.cc @@ -51,6 +51,10 @@ #include "policy/policy_constants.h" #include "ui/base/l10n/l10n_util.h" +#if defined(OS_CHROMEOS) +#include "chrome/browser/chromeos/login/user_manager.h" +#endif + using base::DictionaryValue; using base::Value; using content::BrowserThread; @@ -238,13 +242,25 @@ void ManagedUserService::GetCategoryNames(CategoryList* list) { } std::string ManagedUserService::GetCustodianEmailAddress() const { +#if defined(OS_CHROMEOS) + return chromeos::UserManager::Get()-> + GetManagerDisplayEmailForManagedUser( + chromeos::UserManager::Get()->GetActiveUser()->email()); +#else return profile_->GetPrefs()->GetString(prefs::kManagedUserCustodianEmail); +#endif } std::string ManagedUserService::GetCustodianName() const { +#if defined(OS_CHROMEOS) + return UTF16ToUTF8(chromeos::UserManager::Get()-> + GetManagerDisplayNameForManagedUser( + chromeos::UserManager::Get()->GetActiveUser()->email())); +#else std::string name = profile_->GetPrefs()->GetString( prefs::kManagedUserCustodianName); return name.empty() ? GetCustodianEmailAddress() : name; +#endif } void ManagedUserService::AddNavigationBlockedCallback( diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.css b/chrome/browser/resources/chromeos/login/screen_gaia_signin.css index dc90711..af26cc3 100644 --- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.css +++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.css @@ -115,6 +115,7 @@ margin-top: 16px; } -#createManagedUserLinkPlaceholder { +#createManagedUserLinkPlaceholder, +#createManagedUserNoManagerText { margin-top: 10px; }
\ No newline at end of file diff --git a/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.css b/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.css index 2aa3962..2d5bcde 100644 --- a/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.css +++ b/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.css @@ -45,7 +45,7 @@ line-height: 24px; } -#managed-user-creation strong { +#managed-user-creation-created-1 strong { color: #000; font-weight: normal; } @@ -85,7 +85,16 @@ } #managed-user-creation-intro .below-marketing { - margin: 40px 40px 0; + margin: 20px 40px 0; +} + +#managed-user-creation-intro-alternate-text { + margin-bottom: 12px; + margin-top: 12px; +} + +#managed-user-creation-intro-text-3 { + margin-top: 12px; } #managed-user-creation-created-1 .below-marketing { diff --git a/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.html b/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.html index b912d46..5887325 100644 --- a/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.html +++ b/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.html @@ -6,16 +6,12 @@ <img src="chrome://theme/IDR_SUPERVISED_ILLUSTRATION_START"> </div> <div class="below-marketing"> - <div i18n-content="createManagedUserIntroText1"></div> - <div> - <ul> - <li i18n-content="createManagedUserIntroManagerItem1"></li> - <li i18n-content="createManagedUserIntroManagerItem2"></li> - <li i18n-content="createManagedUserIntroManagerItem3"></li> - </ul> + <div class="page-title" i18n-content="createManagedUserIntroTextTitle"> </div> + <div id="managed-user-creation-intro-alternate-text"></div> <div i18n-content="createManagedUserIntroText2"></div> - <div id="managed-user-creation-intro-text-3"></div> + <div id="managed-user-creation-intro-text-3" + i18n-content="createManagedUserIntroText3"></div> </div> </div> <div id="managed-user-creation-manager" class="page-no-marketing" hidden> diff --git a/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js b/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js index e8c3928..b685ed0 100644 --- a/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js +++ b/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js @@ -488,12 +488,14 @@ login.createScreen('LocallyManagedUserCreationScreen', return; var managerId = selectedPod.user.username; + var managerDisplayId = selectedPod.user.emailAddress; var managerPassword = selectedPod.passwordElement.value; if (managerPassword.empty) return; this.disabled = true; this.context_.managerId = managerId; + this.context_.managerDisplayId = managerDisplayId; this.context_.managerName = selectedPod.user.displayName; chrome.send('authenticateManagerInLocallyManagedUserCreationFlow', [managerId, managerPassword]); @@ -855,19 +857,22 @@ login.createScreen('LocallyManagedUserCreationScreen', }, updateText_: function() { - var managerId = this.context_.managerId; + var managerDisplayId = this.context_.managerDisplayId; + this.updateElementText_('intro-alternate-text', + 'createManagedUserIntroAlternateText'); this.updateElementText_('created-1-text-1', - 'createManagedUserCreated1Text1', - this.context_.managedName); + 'createManagedUserCreated1Text1', + this.context_.managedName); this.updateElementText_('created-1-text-2', - 'createManagedUserCreated1Text2', - loadTimeData.getString('managementURL'), this.context_.managedName); + 'createManagedUserCreated1Text2', + loadTimeData.getString('managementURL'), + this.context_.managedName); this.updateElementText_('created-1-text-3', - 'createManagedUserCreated1Text3', - managerId); + 'createManagedUserCreated1Text3', + managerDisplayId); this.updateElementText_('name-explanation', - 'createManagedUserNameExplanation', - managerId); + 'createManagedUserNameExplanation', + managerDisplayId); }, updateElementText_: function(localId, templateName) { diff --git a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc index 164a96c..bfaa5e4 100644 --- a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc @@ -51,6 +51,10 @@ void LocallyManagedUserCreationScreenHandler::DeclareLocalizedValues( "managedUserCreationFlowGotitButtonTitle", IDS_CREATE_LOCALLY_MANAGED_USER_CREATION_GOT_IT_BUTTON_TITLE); + builder->Add("createManagedUserIntroTextTitle", + IDS_CREATE_LOCALLY_MANAGED_INTRO_TEXT_TITLE); + builder->Add("createManagedUserIntroAlternateText", + IDS_CREATE_LOCALLY_MANAGED_INTRO_ALTERNATE_TEXT); builder->Add("createManagedUserIntroText1", IDS_CREATE_LOCALLY_MANAGED_INTRO_TEXT_1); builder->Add("createManagedUserIntroManagerItem1", |