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 @@
</paper-icon-button-light>
</div>
</template>
</if>
<div id="manage-other-people-subpage-trigger"
class="settings-box" on-click="onManageOtherPeople_" actionable
hidden="[[isChild_]]">
<div class="start">$i18n{manageOtherPeople}</div>
<paper-icon-button-light class="subpage-arrow">
<button aria-label="$i18n{manageOtherPeople}"></button>
</paper-icon-button-light>
</div>
<cr-link-row id="manage-other-people-subpage-trigger"
label="$i18n{manageOtherPeople}" icon-class="subpage-arrow"
on-click="onManageOtherPeople_"></cr-link-row>
</if>
<if expr="not chromeos">
<div class="settings-box" on-click="onImportDataTap_" actionable>
......
......@@ -166,7 +166,7 @@ Polymer({
if (settings.routes.ACCOUNTS) {
map.set(
settings.routes.ACCOUNTS.path,
'#manage-other-people-subpage-trigger .subpage-arrow button');
'#manage-other-people-subpage-trigger');
}
if (settings.routes.ACCOUNT_MANAGER) {
map.set(
......@@ -420,17 +420,12 @@ Polymer({
onAccountManagerTap_: function(e) {
settings.navigateTo(settings.routes.ACCOUNT_MANAGER);
},
// </if>
/** @private */
onManageOtherPeople_: function() {
// <if expr="not chromeos">
this.syncBrowserProxy_.manageOtherPeople();
// </if>
// <if expr="chromeos">
settings.navigateTo(settings.routes.ACCOUNTS);
// </if>
},
// </if>
// <if expr="not chromeos">
/**
......
......@@ -140,11 +140,6 @@ cr.define('settings', function() {
*/
pauseSync() {}
/**
* Opens the multi-profile user manager.
*/
manageOtherPeople() {}
/**
* @return {number} the number of times the sync account promo was shown.
*/
......@@ -240,11 +235,6 @@ cr.define('settings', function() {
chrome.send('SyncSetupPauseSync');
}
/** @override */
manageOtherPeople() {
chrome.send('SyncSetupManageOtherPeople');
}
/** @override */
getPromoImpressionCount() {
return parseInt(
......
......@@ -67,7 +67,6 @@
#include "components/signin/core/browser/signin_manager_base.h"
#else
#include "chrome/browser/signin/signin_util.h"
#include "chrome/browser/ui/user_manager.h"
#include "chrome/browser/ui/webui/profile_helper.h"
#include "components/signin/core/browser/signin_manager.h"
#endif
......@@ -263,10 +262,6 @@ void PeopleHandler::RegisterMessages() {
"SyncSetupGetSyncStatus",
base::BindRepeating(&PeopleHandler::HandleGetSyncStatus,
base::Unretained(this)));
web_ui()->RegisterMessageCallback(
"SyncSetupManageOtherPeople",
base::BindRepeating(&PeopleHandler::HandleManageOtherPeople,
base::Unretained(this)));
#if defined(OS_CHROMEOS)
web_ui()->RegisterMessageCallback(
"AttemptUserExit",
......@@ -831,13 +826,6 @@ void PeopleHandler::HandleGetSyncStatus(const base::ListValue* args) {
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() {
// Stop a timer to handle timeout in waiting for checking network connection.
engine_start_timer_.reset();
......
......@@ -178,7 +178,6 @@ class PeopleHandler : public SettingsPageUIHandler,
void HandlePauseSync(const base::ListValue* args);
#endif
void HandleGetSyncStatus(const base::ListValue* args);
void HandleManageOtherPeople(const base::ListValue* args);
#if !defined(OS_CHROMEOS)
// 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