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

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

Issue 2230833003: MD Settings: Remove iron-pages usage from <settings-sync-page>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 4 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/sync_page.js
diff --git a/chrome/browser/resources/settings/people_page/sync_page.js b/chrome/browser/resources/settings/people_page/sync_page.js
index 0ef62fb65a4b27577a47e0f0ebe1a00b11cb040b..9baaaaccafa1e5013c41a70ecc6057f06cbb3b9c 100644
--- a/chrome/browser/resources/settings/people_page/sync_page.js
+++ b/chrome/browser/resources/settings/people_page/sync_page.js
@@ -61,10 +61,10 @@ Polymer({
},
/**
- * The curerntly displayed page.
+ * The curernt page status.
tommycli 2016/08/11 22:14:28 nit: typo
dpapad 2016/08/11 23:00:49 Fixed.
* @private {?settings.PageStatus}
*/
- selectedPage_: {
+ pageStatus_: {
type: String,
value: settings.PageStatus.SPINNER,
},
@@ -124,7 +124,7 @@ Polymer({
this.addWebUIListener('sync-prefs-changed',
this.handleSyncPrefsChanged_.bind(this));
- if (settings.getCurrentRoute() == settings.Route.SYNC)
+ //if (settings.getCurrentRoute() == settings.Route.SYNC)
dpapad 2016/08/11 01:25:20 Tommy, I commented out lines 127 and line 161 beca
tommycli 2016/08/11 22:14:28 Fuuu I think that would be bad... I think I need t
dpapad 2016/08/11 23:00:49 Per our discussion, when the didNavigateToSyncPage
this.onNavigateToPage_();
},
@@ -145,17 +145,26 @@ Polymer({
this.onNavigateAwayFromPage_();
},
+ /**
+ * @param {!settings.PageStatus} pageStatus
+ * @return {boolean}
+ * @private
+ */
+ isStatus_: function(pageStatus) {
+ return pageStatus == this.pageStatus_;
+ },
+
/** @private */
onNavigateToPage_: function() {
// The element is not ready for C++ interaction until it is attached.
assert(this.isAttached);
- assert(settings.getCurrentRoute() == settings.Route.SYNC);
+ //assert(settings.getCurrentRoute() == settings.Route.SYNC);
if (this.unloadCallback_)
return;
// Display loading page until the settings have been retrieved.
- this.selectedPage_ = settings.PageStatus.SPINNER;
+ this.pageStatus_ = settings.PageStatus.SPINNER;
this.browserProxy_.didNavigateToSyncPage();
@@ -180,7 +189,7 @@ Polymer({
*/
handleSyncPrefsChanged_: function(syncPrefs) {
this.syncPrefs = syncPrefs;
- this.selectedPage_ = settings.PageStatus.CONFIGURE;
+ this.pageStatus_ = settings.PageStatus.CONFIGURE;
// If autofill is not registered or synced, force Payments integration off.
if (!this.syncPrefs.autofillRegistered || !this.syncPrefs.autofillSynced)
@@ -291,14 +300,14 @@ Polymer({
case settings.PageStatus.SPINNER:
case settings.PageStatus.TIMEOUT:
case settings.PageStatus.CONFIGURE:
- this.selectedPage_ = pageStatus;
+ this.pageStatus_ = pageStatus;
return;
case settings.PageStatus.DONE:
if (settings.getCurrentRoute() == settings.Route.SYNC)
settings.navigateTo(settings.Route.PEOPLE);
return;
case settings.PageStatus.PASSPHRASE_FAILED:
- if (this.selectedPage_ == this.pages.CONFIGURE &&
+ if (this.pageStatus_ == this.pages.CONFIGURE &&
this.syncPrefs && this.syncPrefs.passphraseRequired) {
this.$$('#existingPassphraseInput').invalid = true;
}

Powered by Google App Engine
This is Rietveld 408576698