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

Unified Diff: chrome/browser/resources/options/pref_ui.js

Issue 570503002: Compile chrome://settings, part 6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_options_errors_4
Patch Set: fix asserts, rebase Created 6 years, 3 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/options/pref_ui.js
diff --git a/chrome/browser/resources/options/pref_ui.js b/chrome/browser/resources/options/pref_ui.js
index e825b689cec5fdb097af3c7801d09d1fb1df7b7e..f2b6a4c11c163d11bb080a28fbee427405cac248 100644
--- a/chrome/browser/resources/options/pref_ui.js
+++ b/chrome/browser/resources/options/pref_ui.js
@@ -42,7 +42,11 @@ cr.define('options', function() {
/////////////////////////////////////////////////////////////////////////////
// PrefInputElement class:
- // Define a constructor that uses an input element as its underlying element.
+ /**
+ * Define a constructor that uses an input element as its underlying element.
+ * @constructor
+ * @extends {HTMLInputElement}
+ */
var PrefInputElement = cr.ui.define('input');
PrefInputElement.prototype = {
@@ -323,8 +327,11 @@ cr.define('options', function() {
* @private
*/
updatePrefFromState_: function() {
- Preferences.setIntegerPref(this.pref, this.mapPositionToPref(this.value),
- !this.dialogPref, this.metric);
+ Preferences.setIntegerPref(
+ this.pref,
+ this.mapPositionToPref(parseInt(this.value, 10)),
+ !this.dialogPref,
+ this.metric);
},
/**
@@ -575,6 +582,7 @@ cr.define('options', function() {
// Export
return {
PrefCheckbox: PrefCheckbox,
+ PrefInputElement: PrefInputElement,
PrefNumber: PrefNumber,
PrefRadio: PrefRadio,
PrefRange: PrefRange,

Powered by Google App Engine
This is Rietveld 408576698