Commit ab321585 authored by Demetrios Papadopoulos's avatar Demetrios Papadopoulos Committed by Commit Bot

Settings: Remove patterns that break semi-automatic Polymer3 migration.

This is in preparation of running auto conversion tools for c/b/r/settings.

Bug: 1026426
Change-Id: I1a1fdbd1f97910c2611f54f8f0ccb87192b4ad52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2001379
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#731661}
parent cdd1d6e3
...@@ -6,10 +6,8 @@ ...@@ -6,10 +6,8 @@
* @fileoverview 'password-edit-dialog' is the dialog that allows showing a * @fileoverview 'password-edit-dialog' is the dialog that allows showing a
* saved password. * saved password.
*/ */
(function() { cr.define('settings.address', function() {
'use strict'; Polymer({
Polymer({
is: 'settings-address-edit-dialog', is: 'settings-address-edit-dialog',
behaviors: [ behaviors: [
...@@ -50,12 +48,13 @@ Polymer({ ...@@ -50,12 +48,13 @@ Polymer({
/** @override */ /** @override */
attached() { attached() {
this.countryInfo = settings.address.CountryDetailManagerImpl.getInstance(); this.countryInfo =
settings.address.CountryDetailManagerImpl.getInstance();
this.countryInfo.getCountryList().then(countryList => { this.countryInfo.getCountryList().then(countryList => {
this.countries_ = countryList; this.countries_ = countryList;
this.title_ = this.title_ = this.i18n(
this.i18n(this.address.guid ? 'editAddressTitle' : 'addAddressTitle'); this.address.guid ? 'editAddressTitle' : 'addAddressTitle');
// |phoneNumbers| and |emailAddresses| are a single item array. // |phoneNumbers| and |emailAddresses| are a single item array.
// See crbug.com/497934 for details. // See crbug.com/497934 for details.
...@@ -73,7 +72,8 @@ Polymer({ ...@@ -73,7 +72,8 @@ Polymer({
}); });
}); });
// Open is called on the dialog after the address wrapper has been updated. // Open is called on the dialog after the address wrapper has been
// updated.
}, },
/** /**
...@@ -181,8 +181,8 @@ Polymer({ ...@@ -181,8 +181,8 @@ Polymer({
}, },
/** /**
* Syncs the country code back to the address and rebuilds the address wrapper * Syncs the country code back to the address and rebuilds the address
* for the new location. * wrapper for the new location.
* @param {string|undefined} countryCode * @param {string|undefined} countryCode
* @private * @private
*/ */
...@@ -193,13 +193,12 @@ Polymer({ ...@@ -193,13 +193,12 @@ Polymer({
/** @private */ /** @private */
onCountryChange_() { onCountryChange_() {
const countrySelect = /** @type {!HTMLSelectElement} */ (this.$$('select')); const countrySelect =
/** @type {!HTMLSelectElement} */ (this.$$('select'));
this.countryCode_ = countrySelect.value; this.countryCode_ = countrySelect.value;
}, },
}); });
})();
cr.define('settings.address', function() {
/** /**
* Creates a wrapper against a single data member for an address. * Creates a wrapper against a single data member for an address.
*/ */
......
...@@ -20,10 +20,7 @@ cr.define('settings', function() { ...@@ -20,10 +20,7 @@ cr.define('settings', function() {
*/ */
const CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW = 4; const CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW = 4;
return {ChromeCleanupRemovalListItem, CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW}; /**
});
/**
* @fileoverview * @fileoverview
* 'items-to-remove-list' represents a list of items to * 'items-to-remove-list' represents a list of items to
* be removed or changed to be shown on the Chrome Cleanup page. * be removed or changed to be shown on the Chrome Cleanup page.
...@@ -33,15 +30,15 @@ cr.define('settings', function() { ...@@ -33,15 +30,15 @@ cr.define('settings', function() {
* Example: * Example:
* *
* <!-- Items list initially shows |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW| * <!-- Items list initially shows |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW|
* items. If there are more than |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW| * items. If there are more than
* items on the list, then a "show more" link is shown; tapping on it * |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW| items on the list, then a "show
* expands the list. --> * more" link is shown; tapping on it expands the list. -->
* <items-to-remove-list * <items-to-remove-list
* title="Files and programs:" * title="Files and programs:"
* items-to-show="[[filesToShow]]"> * items-to-show="[[filesToShow]]">
* </items-to-remove-list> * </items-to-remove-list>
*/ */
Polymer({ Polymer({
is: 'items-to-remove-list', is: 'items-to-remove-list',
properties: { properties: {
...@@ -81,8 +78,8 @@ Polymer({ ...@@ -81,8 +78,8 @@ Polymer({
remainingItems_: Array, remainingItems_: Array,
/** /**
* The text for the "show more" link available if not all files are visible * The text for the "show more" link available if not all files are
* in the card. * visible in the card.
* @private * @private
*/ */
moreItemsLinkText_: { moreItemsLinkText_: {
...@@ -104,8 +101,8 @@ Polymer({ ...@@ -104,8 +101,8 @@ Polymer({
* 1. If size(itemsToShow) < CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW, then all * 1. If size(itemsToShow) < CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW, then all
* items will be visible. * items will be visible.
* 2. Otherwise, exactly |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW - 1| will be * 2. Otherwise, exactly |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW - 1| will be
* visible and the "show more" link will be rendered. The list presented to * visible and the "show more" link will be rendered. The list presented
* the user will contain exactly |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW| * to the user will contain exactly |CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW|
* elements, and the last one will be the "show more" link. * elements, and the last one will be the "show more" link.
* *
* @param {!Array<settings.ChromeCleanupRemovalListItem>} itemsToShow * @param {!Array<settings.ChromeCleanupRemovalListItem>} itemsToShow
...@@ -123,8 +120,8 @@ Polymer({ ...@@ -123,8 +120,8 @@ Polymer({
return; return;
} }
this.initialItems_ = this.initialItems_ = itemsToShow.slice(
itemsToShow.slice(0, settings.CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW - 1); 0, settings.CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW - 1);
this.remainingItems_ = this.remainingItems_ =
itemsToShow.slice(settings.CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW - 1); itemsToShow.slice(settings.CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW - 1);
...@@ -136,8 +133,8 @@ Polymer({ ...@@ -136,8 +133,8 @@ Polymer({
}, },
/** /**
* Returns the class for the <li> elements that correspond to the items hidden * Returns the class for the <li> elements that correspond to the items
* in the default view. * hidden in the default view.
* @param {boolean} expanded * @param {boolean} expanded
*/ */
remainingItemsClass_(expanded) { remainingItemsClass_(expanded) {
...@@ -152,4 +149,7 @@ Polymer({ ...@@ -152,4 +149,7 @@ Polymer({
hasHighlightSuffix_(item) { hasHighlightSuffix_(item) {
return item.highlightSuffix !== null; return item.highlightSuffix !== null;
}, },
});
return {ChromeCleanupRemovalListItem, CHROME_CLEANUP_DEFAULT_ITEMS_TO_SHOW};
}); });
...@@ -35,6 +35,5 @@ ...@@ -35,6 +35,5 @@
<cr-button on-click="onDisableTap_">$i18n{disable}</cr-button> <cr-button on-click="onDisableTap_">$i18n{disable}</cr-button>
</template> </template>
</template> </template>
<script src="extension_controlled_indicator.js"></script>
</dom-module> </dom-module>
<script src="extension_controlled_indicator.js"></script>
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
/**
* @fileoverview
* 'settings-privacy-page' is the settings page containing privacy and
* security settings.
*/
cr.define('settings', function() { cr.define('settings', function() {
/** /**
* @typedef {{ * @typedef {{
...@@ -11,28 +17,18 @@ cr.define('settings', function() { ...@@ -11,28 +17,18 @@ cr.define('settings', function() {
*/ */
let BlockAutoplayStatus; let BlockAutoplayStatus;
return {BlockAutoplayStatus}; /**
});
/**
* @fileoverview
* 'settings-privacy-page' is the settings page containing privacy and
* security settings.
*/
(function() {
/**
* Must be kept in sync with the C++ enum of the same name. * Must be kept in sync with the C++ enum of the same name.
* @enum {number} * @enum {number}
*/ */
const NetworkPredictionOptions = { const NetworkPredictionOptions = {
ALWAYS: 0, ALWAYS: 0,
WIFI_ONLY: 1, WIFI_ONLY: 1,
NEVER: 2, NEVER: 2,
DEFAULT: 1, DEFAULT: 1,
}; };
Polymer({ Polymer({
is: 'settings-privacy-page', is: 'settings-privacy-page',
behaviors: [ behaviors: [
...@@ -101,9 +97,10 @@ Polymer({ ...@@ -101,9 +97,10 @@ Polymer({
}, },
/** /**
* Used for HTML bindings. This is defined as a property rather than within * Used for HTML bindings. This is defined as a property rather than
* the ready callback, because the value needs to be available before * within the ready callback, because the value needs to be available
* local DOM initialization - otherwise, the toggle has unexpected behavior. * before local DOM initialization - otherwise, the toggle has unexpected
* behavior.
* @private * @private
*/ */
networkPredictionUncheckedValue_: { networkPredictionUncheckedValue_: {
...@@ -164,7 +161,8 @@ Polymer({ ...@@ -164,7 +161,8 @@ Polymer({
enableExperimentalWebPlatformFeatures_: { enableExperimentalWebPlatformFeatures_: {
type: Boolean, type: Boolean,
value() { value() {
return loadTimeData.getBoolean('enableExperimentalWebPlatformFeatures'); return loadTimeData.getBoolean(
'enableExperimentalWebPlatformFeatures');
}, },
}, },
...@@ -343,9 +341,9 @@ Polymer({ ...@@ -343,9 +341,9 @@ Polymer({
}, },
/** /**
* Records changes made to the "can a website check if you have saved payment * Records changes made to the "can a website check if you have saved
* methods" setting for logging, the logic of actually changing the setting * payment methods" setting for logging, the logic of actually changing the
* is taken care of by the webUI pref. * setting is taken care of by the webUI pref.
* @private * @private
*/ */
onCanMakePaymentChange_() { onCanMakePaymentChange_() {
...@@ -428,7 +426,8 @@ Polymer({ ...@@ -428,7 +426,8 @@ Polymer({
/** /**
* Records changes made to the network prediction setting for logging, the * Records changes made to the network prediction setting for logging, the
* logic of actually changing the setting is taken care of by the webUI pref. * logic of actually changing the setting is taken care of by the webUI
* pref.
* @private * @private
*/ */
onNetworkPredictionChange_() { onNetworkPredictionChange_() {
...@@ -488,8 +487,11 @@ Polymer({ ...@@ -488,8 +487,11 @@ Polymer({
/** @private */ /** @private */
getProtectedContentIdentifiersLabel_(value) { getProtectedContentIdentifiersLabel_(value) {
return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers') : return value ?
this.i18n('siteSettingsProtectedContentEnableIdentifiers') :
this.i18n('siteSettingsBlocked'); this.i18n('siteSettingsBlocked');
}, },
});
return {BlockAutoplayStatus};
}); });
})();
...@@ -19,17 +19,7 @@ cr.define('settings', function() { ...@@ -19,17 +19,7 @@ cr.define('settings', function() {
ERROR: 'error', ERROR: 'error',
}; };
return { Polymer({
BioEnrollDialogPage: BioEnrollDialogPage,
};
});
(function() {
'use strict';
const BioEnrollDialogPage = settings.BioEnrollDialogPage;
Polymer({
is: 'settings-security-keys-bio-enroll-dialog', is: 'settings-security-keys-bio-enroll-dialog',
behaviors: [ behaviors: [
...@@ -99,7 +89,8 @@ Polymer({ ...@@ -99,7 +89,8 @@ Polymer({
'security-keys-bio-enroll-error', this.onError_.bind(this)); 'security-keys-bio-enroll-error', this.onError_.bind(this));
this.addWebUIListener( this.addWebUIListener(
'security-keys-bio-enroll-status', this.onEnrolling_.bind(this)); 'security-keys-bio-enroll-status', this.onEnrolling_.bind(this));
this.browserProxy_ = settings.SecurityKeysBioEnrollProxyImpl.getInstance(); this.browserProxy_ =
settings.SecurityKeysBioEnrollProxyImpl.getInstance();
this.browserProxy_.startBioEnroll().then(() => { this.browserProxy_.startBioEnroll().then(() => {
this.dialogPage_ = BioEnrollDialogPage.PIN_PROMPT; this.dialogPage_ = BioEnrollDialogPage.PIN_PROMPT;
}); });
...@@ -220,12 +211,12 @@ Polymer({ ...@@ -220,12 +211,12 @@ Polymer({
if (this.maxSamples_ == -1 && response.status != null) { if (this.maxSamples_ == -1 && response.status != null) {
if (response.status == 0) { if (response.status == 0) {
// If the first sample is valid, remaining is one less than max samples // If the first sample is valid, remaining is one less than max
// required. // samples required.
this.maxSamples_ = response.remaining + 1; this.maxSamples_ = response.remaining + 1;
} else { } else {
// If the first sample failed for any reason (timed out, key full, etc), // If the first sample failed for any reason (timed out, key full,
// the remaining number of samples is the max samples required. // etc), the remaining number of samples is the max samples required.
this.maxSamples_ = response.remaining; this.maxSamples_ = response.remaining;
} }
} }
...@@ -272,11 +263,12 @@ Polymer({ ...@@ -272,11 +263,12 @@ Polymer({
/** @private */ /** @private */
renameNewEnrollment_() { renameNewEnrollment_() {
assert(this.dialogPage_ == BioEnrollDialogPage.CHOOSE_NAME); assert(this.dialogPage_ == BioEnrollDialogPage.CHOOSE_NAME);
// Disable the confirm button to prevent concurrent submissions. It will be // Disable the confirm button to prevent concurrent submissions. It will
// re-enabled by dialogPageChanged_() where appropriate. // be re-enabled by dialogPageChanged_() where appropriate.
this.confirmButtonDisabled_ = true; this.confirmButtonDisabled_ = true;
this.browserProxy_ this.browserProxy_
.renameEnrollment(this.recentEnrollmentId_, this.recentEnrollmentName_) .renameEnrollment(
this.recentEnrollmentId_, this.recentEnrollmentName_)
.then(enrollments => { .then(enrollments => {
this.onEnrollments_(enrollments); this.onEnrollments_(enrollments);
}); });
...@@ -318,8 +310,8 @@ Polymer({ ...@@ -318,8 +310,8 @@ Polymer({
* @param {!Event} e * @param {!Event} e
*/ */
onIronSelect_(e) { onIronSelect_(e) {
// Prevent this event from bubbling since it is unnecessarily triggering the // Prevent this event from bubbling since it is unnecessarily triggering
// listener within settings-animated-pages. // the listener within settings-animated-pages.
e.stopPropagation(); e.stopPropagation();
}, },
...@@ -368,5 +360,9 @@ Polymer({ ...@@ -368,5 +360,9 @@ Polymer({
'securityKeysBioEnrollmentEnrollmentsLabel' : 'securityKeysBioEnrollmentEnrollmentsLabel' :
'securityKeysBioEnrollmentNoEnrollmentsLabel'); 'securityKeysBioEnrollmentNoEnrollmentsLabel');
}, },
});
return {
BioEnrollDialogPage: BioEnrollDialogPage,
};
}); });
})();
...@@ -16,17 +16,7 @@ cr.define('settings', function() { ...@@ -16,17 +16,7 @@ cr.define('settings', function() {
ERROR: 'error', ERROR: 'error',
}; };
return { Polymer({
CredentialManagementDialogPage: CredentialManagementDialogPage,
};
});
(function() {
'use strict';
const CredentialManagementDialogPage = settings.CredentialManagementDialogPage;
Polymer({
is: 'settings-security-keys-credential-management-dialog', is: 'settings-security-keys-credential-management-dialog',
behaviors: [ behaviors: [
...@@ -129,7 +119,8 @@ Polymer({ ...@@ -129,7 +119,8 @@ Polymer({
*/ */
onCredentials_(credentials) { onCredentials_(credentials) {
if (!credentials.length) { if (!credentials.length) {
this.onError_(this.i18n('securityKeysCredentialManagementNoCredentials')); this.onError_(
this.i18n('securityKeysCredentialManagementNoCredentials'));
return; return;
} }
this.credentials_ = credentials; this.credentials_ = credentials;
...@@ -222,8 +213,8 @@ Polymer({ ...@@ -222,8 +213,8 @@ Polymer({
* @private * @private
*/ */
onIronSelect_(e) { onIronSelect_(e) {
// Prevent this event from bubbling since it is unnecessarily triggering the // Prevent this event from bubbling since it is unnecessarily triggering
// listener within settings-animated-pages. // the listener within settings-animated-pages.
e.stopPropagation(); e.stopPropagation();
}, },
...@@ -259,12 +250,17 @@ Polymer({ ...@@ -259,12 +250,17 @@ Polymer({
this.confirmButtonDisabled_ = true; this.confirmButtonDisabled_ = true;
this.deleteInProgress_ = true; this.deleteInProgress_ = true;
this.browserProxy_.deleteCredentials(Array.from(this.checkedCredentialIds_)) this.browserProxy_
.deleteCredentials(Array.from(this.checkedCredentialIds_))
.then((err) => { .then((err) => {
this.confirmButtonDisabled_ = false; this.confirmButtonDisabled_ = false;
this.deleteInProgress_ = false; this.deleteInProgress_ = false;
this.onError_(err); this.onError_(err);
}); });
}, },
});
return {
CredentialManagementDialogPage: CredentialManagementDialogPage,
};
}); });
})();
...@@ -16,12 +16,8 @@ cr.define('settings', function() { ...@@ -16,12 +16,8 @@ cr.define('settings', function() {
*/ */
let PINFieldSubmitFunc; let PINFieldSubmitFunc;
return {
PINFieldSubmitFunc: PINFieldSubmitFunc,
};
});
Polymer({ Polymer({
is: 'settings-security-keys-pin-field', is: 'settings-security-keys-pin-field',
behaviors: [ behaviors: [
...@@ -72,8 +68,8 @@ Polymer({ ...@@ -72,8 +68,8 @@ Polymer({
}, },
/** /**
* Attempts submission of the PIN by invoking |submitFunc|. Updates the UI to * Attempts submission of the PIN by invoking |submitFunc|. Updates the UI
* show an error if the PIN was incorrect. * to show an error if the PIN was incorrect.
* @param {!settings.PINFieldSubmitFunc} submitFunc * @param {!settings.PINFieldSubmitFunc} submitFunc
* @return {!Promise} resolves if the PIN was correct, else rejects * @return {!Promise} resolves if the PIN was correct, else rejects
*/ */
...@@ -204,4 +200,9 @@ Polymer({ ...@@ -204,4 +200,9 @@ Polymer({
// label. // label.
this.fire('iron-announce', {text: this.error_}); this.fire('iron-announce', {text: this.error_});
}, },
});
return {
PINFieldSubmitFunc: PINFieldSubmitFunc,
};
}); });
...@@ -19,17 +19,7 @@ cr.define('settings', function() { ...@@ -19,17 +19,7 @@ cr.define('settings', function() {
}; };
return { Polymer({
ResetDialogPage: ResetDialogPage,
};
});
(function() {
'use strict';
const ResetDialogPage = settings.ResetDialogPage;
Polymer({
is: 'settings-security-keys-reset-dialog', is: 'settings-security-keys-reset-dialog',
behaviors: [I18nBehavior], behaviors: [I18nBehavior],
...@@ -124,8 +114,8 @@ Polymer({ ...@@ -124,8 +114,8 @@ Polymer({
* @private * @private
*/ */
onIronSelect_(e) { onIronSelect_(e) {
// Prevent this event from bubbling since it is unnecessarily triggering the // Prevent this event from bubbling since it is unnecessarily triggering
// listener within settings-animated-pages. // the listener within settings-animated-pages.
e.stopPropagation(); e.stopPropagation();
}, },
...@@ -161,5 +151,9 @@ Polymer({ ...@@ -161,5 +151,9 @@ Polymer({
maybeActionButton_(complete) { maybeActionButton_(complete) {
return complete ? 'action-button' : 'cancel-button'; return complete ? 'action-button' : 'cancel-button';
}, },
});
return {
ResetDialogPage: ResetDialogPage,
};
}); });
})();
...@@ -19,17 +19,7 @@ cr.define('settings', function() { ...@@ -19,17 +19,7 @@ cr.define('settings', function() {
SUCCESS: 'success', SUCCESS: 'success',
}; };
return { Polymer({
SetPINDialogPage: SetPINDialogPage,
};
});
(function() {
'use strict';
const SetPINDialogPage = settings.SetPINDialogPage;
Polymer({
is: 'settings-security-keys-set-pin-dialog', is: 'settings-security-keys-set-pin-dialog',
behaviors: [I18nBehavior], behaviors: [I18nBehavior],
...@@ -166,7 +156,8 @@ Polymer({ ...@@ -166,7 +156,8 @@ Polymer({
/** @override */ /** @override */
attached() { attached() {
this.title_ = this.i18n('securityKeysSetPINInitialTitle'); this.title_ = this.i18n('securityKeysSetPINInitialTitle');
this.browserProxy_ = settings.SecurityKeysPINBrowserProxyImpl.getInstance(); this.browserProxy_ =
settings.SecurityKeysPINBrowserProxyImpl.getInstance();
this.$.dialog.showModal(); this.$.dialog.showModal();
Polymer.RenderStatus.afterNextRender(this, function() { Polymer.RenderStatus.afterNextRender(this, function() {
...@@ -192,7 +183,8 @@ Polymer({ ...@@ -192,7 +183,8 @@ Polymer({
this.finish_(); this.finish_();
} }
} else if (errorCode == 0) { } else if (errorCode == 0) {
// A device can also signal that it is locked by returning zero retries. // A device can also signal that it is locked by returning zero
// retries.
this.shown_ = SetPINDialogPage.LOCKED; this.shown_ = SetPINDialogPage.LOCKED;
this.finish_(); this.finish_();
} else { } else {
...@@ -204,7 +196,8 @@ Polymer({ ...@@ -204,7 +196,8 @@ Polymer({
this.setPINButtonValid_ = true; this.setPINButtonValid_ = true;
this.retries_ = errorCode; this.retries_ = errorCode;
// retries_ may be null to indicate that there is currently no PIN set. // retries_ may be null to indicate that there is currently no PIN
// set.
let focusTarget; let focusTarget;
if (this.retries_ === null) { if (this.retries_ === null) {
this.showCurrentEntry_ = false; this.showCurrentEntry_ = false;
...@@ -251,8 +244,8 @@ Polymer({ ...@@ -251,8 +244,8 @@ Polymer({
* @private * @private
*/ */
onIronSelect_(e) { onIronSelect_(e) {
// Prevent this event from bubbling since it is unnecessarily triggering the // Prevent this event from bubbling since it is unnecessarily triggering
// listener within settings-animated-pages. // the listener within settings-animated-pages.
e.stopPropagation(); e.stopPropagation();
}, },
...@@ -323,7 +316,8 @@ Polymer({ ...@@ -323,7 +316,8 @@ Polymer({
mismatchError_(retries) { mismatchError_(retries) {
// Warn the user if the number of retries is getting low. // Warn the user if the number of retries is getting low.
if (1 < retries && retries <= 3) { if (1 < retries && retries <= 3) {
return this.i18n('securityKeysPINIncorrectRetriesPl', retries.toString()); return this.i18n(
'securityKeysPINIncorrectRetriesPl', retries.toString());
} }
if (retries == 1) { if (retries == 1) {
return this.i18n('securityKeysPINIncorrectRetriesSin'); return this.i18n('securityKeysPINIncorrectRetriesSin');
...@@ -481,5 +475,9 @@ Polymer({ ...@@ -481,5 +475,9 @@ Polymer({
inputType_() { inputType_() {
return this.pinsVisible_ ? 'text' : 'password'; return this.pinsVisible_ ? 'text' : 'password';
}, },
});
return {
SetPINDialogPage: SetPINDialogPage,
};
}); });
})();
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
(function() { cr.define('settings.WebsiteUsagePrivateApi', function() {
'use strict'; Polymer({
Polymer({
is: 'website-usage-private-api', is: 'website-usage-private-api',
properties: { properties: {
...@@ -47,10 +45,8 @@ Polymer({ ...@@ -47,10 +45,8 @@ Polymer({
notifyUsageDeleted(origin) { notifyUsageDeleted(origin) {
this.fire('usage-deleted', {origin: origin}); this.fire('usage-deleted', {origin: origin});
}, },
}); });
})();
cr.define('settings.WebsiteUsagePrivateApi', function() {
/** /**
* @type {Object} An instance of the polymer object defined above. * @type {Object} An instance of the polymer object defined above.
* All data will be set here. * All data will be set here.
......
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