Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1920)

Unified Diff: chrome/browser/resources/settings/people_page/people_page.js

Issue 1900913002: Settings People Revamp: Split Profile Info out into its own handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/people_page/people_page.js
diff --git a/chrome/browser/resources/settings/people_page/people_page.js b/chrome/browser/resources/settings/people_page/people_page.js
index 88d361689a470d7b50159c775aecde515bf14074..cc1e9b4126faedfb6fb47dbbe5dc11ccadc24be1 100644
--- a/chrome/browser/resources/settings/people_page/people_page.js
+++ b/chrome/browser/resources/settings/people_page/people_page.js
@@ -56,7 +56,7 @@ Polymer({
<if expr="chromeos">
/** @private {!settings.EasyUnlockBrowserProxyImpl} */
- browserProxy_: {
+ easyUnlockBrowserProxy_: {
type: Object,
value: function() {
return settings.EasyUnlockBrowserProxyImpl.getInstance();
@@ -100,7 +100,11 @@ Polymer({
/** @override */
attached: function() {
- settings.SyncPrivateApi.getProfileInfo(this.handleProfileInfo_.bind(this));
+ settings.ProfileInfoBrowserProxyImpl.getInstance().getProfileInfo().then(
+ this.handleProfileInfo_.bind(this));
+ this.addWebUIListener('profile-info-changed',
+ this.handleProfileInfo_.bind(this));
+
settings.SyncPrivateApi.getSyncStatus(
this.handleSyncStatusFetched_.bind(this));
@@ -109,7 +113,7 @@ Polymer({
this.addWebUIListener(
'easy-unlock-enabled-status',
this.handleEasyUnlockEnabledStatusChanged_.bind(this));
- this.browserProxy_.getEnabledStatus().then(
+ this.easyUnlockBrowserProxy_.getEnabledStatus().then(
this.handleEasyUnlockEnabledStatusChanged_.bind(this));
}
</if>
@@ -118,12 +122,11 @@ Polymer({
/**
* Handler for when the profile's icon and name is updated.
* @private
- * @param {!string} name
- * @param {!string} iconUrl
+ * @param {!settings.ProfileInfo} info
*/
- handleProfileInfo_: function(name, iconUrl) {
- this.profileName_ = name;
- this.profileIconUrl_ = iconUrl;
+ handleProfileInfo_: function(info) {
+ this.profileName_ = info.name;
+ this.profileIconUrl_ = info.iconUrl;
},
/**
@@ -196,7 +199,7 @@ Polymer({
<if expr="chromeos">
/** @private */
onEasyUnlockSetupTap_: function() {
- this.browserProxy_.startTurnOnFlow();
+ this.easyUnlockBrowserProxy_.startTurnOnFlow();
},
/** @private */

Powered by Google App Engine
This is Rietveld 408576698