Commit c36d09a9 authored by Jan Wilken Dörrie's avatar Jan Wilken Dörrie Committed by Commit Bot

[Settings WebUI] Only show "Manage other people" on CrOS

This change modifies the people section to only show the "Manage other
people" row on Chrome OS. On other platforms this option will still be
accessible from the Profile Chooser.

Bug: 907035
Change-Id: I7c2ab9ee97658e37a11f9d9a6d9ac0736ed2a1d2
Reviewed-on: https://chromium-review.googlesource.com/c/1349336Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613258}
parent b2752593
...@@ -300,16 +300,11 @@ ...@@ -300,16 +300,11 @@
</paper-icon-button-light> </paper-icon-button-light>
</div> </div>
</template> </template>
</if>
<div id="manage-other-people-subpage-trigger" <cr-link-row id="manage-other-people-subpage-trigger"
class="settings-box" on-click="onManageOtherPeople_" actionable label="$i18n{manageOtherPeople}" icon-class="subpage-arrow"
hidden="[[isChild_]]"> on-click="onManageOtherPeople_"></cr-link-row>
<div class="start">$i18n{manageOtherPeople}</div> </if>
<paper-icon-button-light class="subpage-arrow">
<button aria-label="$i18n{manageOtherPeople}"></button>
</paper-icon-button-light>
</div>
<if expr="not chromeos"> <if expr="not chromeos">
<div class="settings-box" on-click="onImportDataTap_" actionable> <div class="settings-box" on-click="onImportDataTap_" actionable>
......
...@@ -166,7 +166,7 @@ Polymer({ ...@@ -166,7 +166,7 @@ Polymer({
if (settings.routes.ACCOUNTS) { if (settings.routes.ACCOUNTS) {
map.set( map.set(
settings.routes.ACCOUNTS.path, settings.routes.ACCOUNTS.path,
'#manage-other-people-subpage-trigger .subpage-arrow button'); '#manage-other-people-subpage-trigger');
} }
if (settings.routes.ACCOUNT_MANAGER) { if (settings.routes.ACCOUNT_MANAGER) {
map.set( map.set(
...@@ -420,17 +420,12 @@ Polymer({ ...@@ -420,17 +420,12 @@ Polymer({
onAccountManagerTap_: function(e) { onAccountManagerTap_: function(e) {
settings.navigateTo(settings.routes.ACCOUNT_MANAGER); settings.navigateTo(settings.routes.ACCOUNT_MANAGER);
}, },
// </if>
/** @private */ /** @private */
onManageOtherPeople_: function() { onManageOtherPeople_: function() {
// <if expr="not chromeos">
this.syncBrowserProxy_.manageOtherPeople();
// </if>
// <if expr="chromeos">
settings.navigateTo(settings.routes.ACCOUNTS); settings.navigateTo(settings.routes.ACCOUNTS);
// </if>
}, },
// </if>
// <if expr="not chromeos"> // <if expr="not chromeos">
/** /**
......
...@@ -140,11 +140,6 @@ cr.define('settings', function() { ...@@ -140,11 +140,6 @@ cr.define('settings', function() {
*/ */
pauseSync() {} pauseSync() {}
/**
* Opens the multi-profile user manager.
*/
manageOtherPeople() {}
/** /**
* @return {number} the number of times the sync account promo was shown. * @return {number} the number of times the sync account promo was shown.
*/ */
...@@ -240,11 +235,6 @@ cr.define('settings', function() { ...@@ -240,11 +235,6 @@ cr.define('settings', function() {
chrome.send('SyncSetupPauseSync'); chrome.send('SyncSetupPauseSync');
} }
/** @override */
manageOtherPeople() {
chrome.send('SyncSetupManageOtherPeople');
}
/** @override */ /** @override */
getPromoImpressionCount() { getPromoImpressionCount() {
return parseInt( return parseInt(
......
...@@ -67,7 +67,6 @@ ...@@ -67,7 +67,6 @@
#include "components/signin/core/browser/signin_manager_base.h" #include "components/signin/core/browser/signin_manager_base.h"
#else #else
#include "chrome/browser/signin/signin_util.h" #include "chrome/browser/signin/signin_util.h"
#include "chrome/browser/ui/user_manager.h"
#include "chrome/browser/ui/webui/profile_helper.h" #include "chrome/browser/ui/webui/profile_helper.h"
#include "components/signin/core/browser/signin_manager.h" #include "components/signin/core/browser/signin_manager.h"
#endif #endif
...@@ -263,10 +262,6 @@ void PeopleHandler::RegisterMessages() { ...@@ -263,10 +262,6 @@ void PeopleHandler::RegisterMessages() {
"SyncSetupGetSyncStatus", "SyncSetupGetSyncStatus",
base::BindRepeating(&PeopleHandler::HandleGetSyncStatus, base::BindRepeating(&PeopleHandler::HandleGetSyncStatus,
base::Unretained(this))); base::Unretained(this)));
web_ui()->RegisterMessageCallback(
"SyncSetupManageOtherPeople",
base::BindRepeating(&PeopleHandler::HandleManageOtherPeople,
base::Unretained(this)));
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
web_ui()->RegisterMessageCallback( web_ui()->RegisterMessageCallback(
"AttemptUserExit", "AttemptUserExit",
...@@ -831,13 +826,6 @@ void PeopleHandler::HandleGetSyncStatus(const base::ListValue* args) { ...@@ -831,13 +826,6 @@ void PeopleHandler::HandleGetSyncStatus(const base::ListValue* args) {
ResolveJavascriptCallback(*callback_id, *GetSyncStatusDictionary()); ResolveJavascriptCallback(*callback_id, *GetSyncStatusDictionary());
} }
void PeopleHandler::HandleManageOtherPeople(const base::ListValue* /* args */) {
#if !defined(OS_CHROMEOS)
UserManager::Show(base::FilePath(),
profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
#endif // !defined(OS_CHROMEOS)
}
void PeopleHandler::CloseSyncSetup() { void PeopleHandler::CloseSyncSetup() {
// Stop a timer to handle timeout in waiting for checking network connection. // Stop a timer to handle timeout in waiting for checking network connection.
engine_start_timer_.reset(); engine_start_timer_.reset();
......
...@@ -178,7 +178,6 @@ class PeopleHandler : public SettingsPageUIHandler, ...@@ -178,7 +178,6 @@ class PeopleHandler : public SettingsPageUIHandler,
void HandlePauseSync(const base::ListValue* args); void HandlePauseSync(const base::ListValue* args);
#endif #endif
void HandleGetSyncStatus(const base::ListValue* args); void HandleGetSyncStatus(const base::ListValue* args);
void HandleManageOtherPeople(const base::ListValue* args);
#if !defined(OS_CHROMEOS) #if !defined(OS_CHROMEOS)
// Displays the GAIA login form. // Displays the GAIA login form.
......
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