From b1255a7fed2dba501c5774a3b94f0a09c2f2652e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wilken=20D=C3=B6rrie?= Date: Wed, 5 Dec 2018 01:10:36 +0000 Subject: [PATCH] [Settings WebUI] Only show "Manage other people" on CrOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/1349336 Reviewed-by: Demetrios Papadopoulos Commit-Queue: Jan Wilken Dörrie Cr-Original-Commit-Position: refs/heads/master@{#613258}(cherry picked from commit c36d09a98363e906fe3aab009117fd86db49dd76) Reviewed-on: https://chromium-review.googlesource.com/c/1362497 Reviewed-by: Jan Wilken Dörrie Cr-Commit-Position: refs/branch-heads/3626@{#61} Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437} --- .../resources/settings/people_page/people_page.html | 13 ++++--------- .../resources/settings/people_page/people_page.js | 9 ++------- .../settings/people_page/sync_browser_proxy.js | 10 ---------- chrome/browser/ui/webui/settings/people_handler.cc | 12 ------------ chrome/browser/ui/webui/settings/people_handler.h | 1 - 5 files changed, 6 insertions(+), 39 deletions(-) diff --git a/chrome/browser/resources/settings/people_page/people_page.html b/chrome/browser/resources/settings/people_page/people_page.html index 901222d51526..dfd7b8acb49f 100644 --- a/chrome/browser/resources/settings/people_page/people_page.html +++ b/chrome/browser/resources/settings/people_page/people_page.html @@ -300,16 +300,11 @@ - - + +
diff --git a/chrome/browser/resources/settings/people_page/people_page.js b/chrome/browser/resources/settings/people_page/people_page.js index e3f6901f581f..977fa30fceb0 100644 --- a/chrome/browser/resources/settings/people_page/people_page.js +++ b/chrome/browser/resources/settings/people_page/people_page.js @@ -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); }, - // /** @private */ onManageOtherPeople_: function() { - // - this.syncBrowserProxy_.manageOtherPeople(); - // - // settings.navigateTo(settings.routes.ACCOUNTS); - // }, + // // /** diff --git a/chrome/browser/resources/settings/people_page/sync_browser_proxy.js b/chrome/browser/resources/settings/people_page/sync_browser_proxy.js index 59b58d05a40f..fffa2eceed2a 100644 --- a/chrome/browser/resources/settings/people_page/sync_browser_proxy.js +++ b/chrome/browser/resources/settings/people_page/sync_browser_proxy.js @@ -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( diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc index 196d8b95a156..a1e56381edc8 100644 --- a/chrome/browser/ui/webui/settings/people_handler.cc +++ b/chrome/browser/ui/webui/settings/people_handler.cc @@ -66,7 +66,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 @@ -262,10 +261,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", @@ -830,13 +825,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(); diff --git a/chrome/browser/ui/webui/settings/people_handler.h b/chrome/browser/ui/webui/settings/people_handler.h index dbf9e844629d..6af3d98b7ec7 100644 --- a/chrome/browser/ui/webui/settings/people_handler.h +++ b/chrome/browser/ui/webui/settings/people_handler.h @@ -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.