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

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

Issue 2893053002: md-settings: wrap lock screen dialogs in dom-if. (Closed)
Patch Set: Fixed patch set 1 errors. Created 3 years, 7 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/password_prompt_dialog.js
diff --git a/chrome/browser/resources/settings/people_page/password_prompt_dialog.js b/chrome/browser/resources/settings/people_page/password_prompt_dialog.js
index 2625f2ba6195b916f413eee1bed0a54f0b003676..7bbb914fd5300cd63c563fa22a472c5a68622bb9 100644
--- a/chrome/browser/resources/settings/people_page/password_prompt_dialog.js
+++ b/chrome/browser/resources/settings/people_page/password_prompt_dialog.js
@@ -97,30 +97,13 @@ Polymer({
/** @override */
attached: function() {
+ this.writeUma_(LockScreenProgress.START_SCREEN_LOCK);
+ this.$.dialog.showModal();
this.async(function() {
this.$.passwordInput.focus();
}.bind(this));
},
- /**
- * Open up the dialog. This will wait until the dialog has loaded before
- * opening it.
- */
- open: function() {
- // Wait until the dialog is attached to the DOM before trying to open it.
- var dialog = /** @type {{isConnected: boolean}} */ (this.$.dialog);
- if (!dialog.isConnected) {
- setTimeout(this.open.bind(this));
- return;
- }
-
- if (this.$.dialog.open)
- return;
-
- this.writeUma_(LockScreenProgress.START_SCREEN_LOCK);
- this.$.dialog.showModal();
- },
-
/** @private */
onCancelTap_: function() {
if (this.$.dialog.open)

Powered by Google App Engine
This is Rietveld 408576698