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 ...@@ -9,7 +9,7 @@ import {addSingletonGetter, sendWithPromise} from 'chrome://resources/js/cr.m.js
* @typedef {{ * @typedef {{
* profilePath: string, * profilePath: string,
* localProfileName: string, * localProfileName: string,
* isSignedIn: boolean, * isSyncing: boolean,
* gaiaName: string, * gaiaName: string,
* userName: string, * userName: string,
* avatarIcon: string, * avatarIcon: string,
......
...@@ -99,7 +99,9 @@ ...@@ -99,7 +99,9 @@
</div> </div>
<div> <div>
[[removeWarningText_]] [[removeWarningText_]]
<span class="key-text">[[profileState.userName]]</span> <span hidden$="[[!profileState.isSyncing]]" class="key-text">
[[profileState.userName]]
</span>
</div> </div>
<table class="statistics"> <table class="statistics">
<template is="dom-repeat" items="[[profileStatistics_]]"> <template is="dom-repeat" items="[[profileStatistics_]]">
......
...@@ -119,7 +119,7 @@ Polymer({ ...@@ -119,7 +119,7 @@ Polymer({
*/ */
computeRemoveWarningText_() { computeRemoveWarningText_() {
return this.i18n( return this.i18n(
this.profileState.isSignedIn ? 'removeWarningSignedInProfile' : this.profileState.isSyncing ? 'removeWarningSignedInProfile' :
'removeWarningLocalProfile'); 'removeWarningLocalProfile');
}, },
......
...@@ -268,7 +268,8 @@ base::Value ProfilePickerHandler::GetProfilesList() { ...@@ -268,7 +268,8 @@ base::Value ProfilePickerHandler::GetProfilesList() {
util::FilePathToValue(entry->GetPath())); util::FilePathToValue(entry->GetPath()));
profile_entry->SetString("localProfileName", entry->GetLocalProfileName()); profile_entry->SetString("localProfileName", entry->GetLocalProfileName());
profile_entry->SetBoolPath( 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 // GAIA name/user name can be empty, if the profile is not signed in to
// chrome. // chrome.
profile_entry->SetString("gaiaName", entry->GetGAIANameToDisplay()); 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