From 14d1b96db51ef388a53d96c15092f3c2c9faecbe Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Sat, 17 Feb 2018 01:09:17 +0100 Subject: [PATCH] Ignore managed prefs documented as "Deprecated." Deprecated keys are removed from web/default_preferences.json, but still maintained in managed_preferences.json. --- gulpfile.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 4d2bdc808d7b3e..b1262cfaad399c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -192,6 +192,13 @@ function getVersionJSON() { function checkChromePreferencesFile(chromePrefsPath, webPrefsPath) { var chromePrefs = JSON.parse(fs.readFileSync(chromePrefsPath).toString()); var chromePrefsKeys = Object.keys(chromePrefs.properties); + chromePrefsKeys = chromePrefsKeys.filter(function (key) { + var description = chromePrefs.properties[key].description; + // Deprecated keys are allowed. The code maintained is responsible for + // adding migration logic to + // extensions/chromium/options/migration.js and web/chromecom.js . + return !description || !description.startsWith('Deprecated.'); + }); chromePrefsKeys.sort(); var webPrefs = JSON.parse(fs.readFileSync(webPrefsPath).toString()); var webPrefsKeys = Object.keys(webPrefs);