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

Unified Diff: chrome/browser/resources/options/chromeos/internet_detail.js

Issue 566063002: Compile chrome://settings, part 8: the final battle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_options_errors_6
Patch Set: fixed comments 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/chromeos/internet_detail.js
diff --git a/chrome/browser/resources/options/chromeos/internet_detail.js b/chrome/browser/resources/options/chromeos/internet_detail.js
index 5d3e65ba713fc44e70f66cbab1d5e6e7ae08f6d7..b06667329bba16db0d6a9d33d327815f2896d302 100644
--- a/chrome/browser/resources/options/chromeos/internet_detail.js
+++ b/chrome/browser/resources/options/chromeos/internet_detail.js
@@ -114,7 +114,7 @@ cr.define('options.internet', function() {
/**
* Returns the netmask as a string for a given prefix length.
- * @param {string} prefixLength The ONC routing prefix length.
+ * @param {number} prefixLength The ONC routing prefix length.
* @return {string} The corresponding netmask.
*/
function prefixLengthToNetmask(prefixLength) {
@@ -1184,7 +1184,9 @@ cr.define('options.internet', function() {
}
var savedPrefix = onc.getActiveValue('SavedIPConfig.RoutingPrefix');
if (savedPrefix != undefined) {
- var savedNetmask = prefixLengthToNetmask(savedPrefix);
+ assert(typeof savedPrefix == 'number');
+ var savedNetmask = prefixLengthToNetmask(
+ /** @type {number} */(savedPrefix));
inetNetmask.automatic = savedNetmask;
inetNetmask.value = savedNetmask;
}
@@ -1210,7 +1212,9 @@ cr.define('options.internet', function() {
}
var staticPrefix = onc.getActiveValue('StaticIPConfig.RoutingPrefix');
if (staticPrefix != undefined) {
- var staticNetmask = prefixLengthToNetmask(staticPrefix);
+ assert(typeof staticPrefix == 'number');
+ var staticNetmask = prefixLengthToNetmask(
+ /** @type {number} */(staticPrefix));
inetNetmask.user = staticNetmask;
inetNetmask.value = staticNetmask;
}

Powered by Google App Engine
This is Rietveld 408576698