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

Unified Diff: chrome/browser/resources/settings/prefs/prefs.js

Issue 1138013005: Lots of small fixes to help wire things together for the 0.8 upgrade. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove undefined observer Created 5 years, 7 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/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.
for (let objKey in prefObj) {
- root[objKey] = prefObj[objKey];
+ let path = 'settings.' + prefObj.key + '.' + objKey;
+ this.setPathValue(path, prefObj[objKey]);
}
if (shouldObserve) {

Powered by Google App Engine
This is Rietveld 408576698