Commit 2f017bdc authored by Monica Basta's avatar Monica Basta Committed by Commit Bot

[ProfilePicker]: Show "local" remove string when not syncing

Bug: 1119412
Change-Id: Iacb441f18cda7975d2e797fe783caee181c7f98a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362804Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Monica Basta <msalama@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799781}
parent b84fd41e
......@@ -9,7 +9,7 @@ import {addSingletonGetter, sendWithPromise} from 'chrome://resources/js/cr.m.js
* @typedef {{
* profilePath: string,
* localProfileName: string,
* isSignedIn: boolean,
* isSyncing: boolean,
* gaiaName: string,
* userName: string,
* avatarIcon: string,
......
......@@ -99,7 +99,9 @@
</div>
<div>
[[removeWarningText_]]
<span class="key-text">[[profileState.userName]]</span>
<span hidden$="[[!profileState.isSyncing]]" class="key-text">
[[profileState.userName]]
</span>
</div>
<table class="statistics">
<template is="dom-repeat" items="[[profileStatistics_]]">
......
......@@ -119,8 +119,8 @@ Polymer({
*/
computeRemoveWarningText_() {
return this.i18n(
this.profileState.isSignedIn ? 'removeWarningSignedInProfile' :
'removeWarningLocalProfile');
this.profileState.isSyncing ? 'removeWarningSignedInProfile' :
'removeWarningLocalProfile');
},
/**
......
......@@ -268,7 +268,8 @@ base::Value ProfilePickerHandler::GetProfilesList() {
util::FilePathToValue(entry->GetPath()));
profile_entry->SetString("localProfileName", entry->GetLocalProfileName());
profile_entry->SetBoolPath(
"isSignedIn", entry->GetSigninState() != SigninState::kNotSignedIn);
"isSyncing", entry->GetSigninState() ==
SigninState::kSignedInWithConsentedPrimaryAccount);
// GAIA name/user name can be empty, if the profile is not signed in to
// chrome.
profile_entry->SetString("gaiaName", entry->GetGAIANameToDisplay());
......
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