Chromium Code Reviews| Index: chrome/browser/resources/settings/prefs/prefs.js |
| diff --git a/chrome/browser/resources/settings/prefs/prefs.js b/chrome/browser/resources/settings/prefs/prefs.js |
| index 8cc30493e91f29f742b54ebdc4788842843a1d62..4ad71288833ea9cc15e8e5261e48991773e51f84 100644 |
| --- a/chrome/browser/resources/settings/prefs/prefs.js |
| +++ b/chrome/browser/resources/settings/prefs/prefs.js |
| @@ -83,7 +83,8 @@ |
| let token = tokens[i]; |
| if (!root.hasOwnProperty(token)) { |
| - root[token] = {}; |
| + let path = 'settings.' + tokens.slice(0, i + 1).join('.'); |
| + this.setPathValue(path, {}); |
| } |
| root = root[token]; |
| } |
| @@ -91,7 +92,8 @@ |
| // NOTE: Do this copy rather than just a re-assignment, so that the |
| // ObjectObserver fires. |
|
michaelpg
2015/05/13 19:38:30
is this logic still valid, or can we just use this
Jeremy Klein
2015/05/13 21:13:56
Hard to say for sure until all this binding logic
|
| for (let objKey in prefObj) { |
| - root[objKey] = prefObj[objKey]; |
| + let path = 'settings.' + prefObj.key + '.' + objKey; |
| + this.setPathValue(path, prefObj[objKey]); |
| } |
| if (shouldObserve) { |