| Index: chrome/browser/resources/options/preferences.js
|
| diff --git a/chrome/browser/resources/options/preferences.js b/chrome/browser/resources/options/preferences.js
|
| index 12ff304566be00df7ee48f537ded94665a2f4c04..059b6b42b4320805fd67c4667174bdf836c314d5 100644
|
| --- a/chrome/browser/resources/options/preferences.js
|
| +++ b/chrome/browser/resources/options/preferences.js
|
| @@ -73,6 +73,16 @@ Preferences.setStringPref = function(name, value) {
|
| chrome.send('setStringPref', [name, value]);
|
| };
|
|
|
| +/**
|
| + * Sets value of a JSON preference.
|
| + * and signals its changed value.
|
| + * @param {string} name Preference name.
|
| + * @param {string} value New preference value.
|
| + */
|
| +Preferences.setObjectPref = function(name, value) {
|
| + chrome.send('setObjectPref', [name, JSON.stringify(value)]);
|
| +};
|
| +
|
| Preferences.prototype = {
|
| __proto__: cr.EventTarget.prototype,
|
|
|
| @@ -112,7 +122,8 @@ Preferences.prototype = {
|
| */
|
| flattenMapAndDispatchEvent_: function(prefix, dict) {
|
| for (var prefName in dict) {
|
| - if (typeof dict[prefName] == 'object') {
|
| + if (typeof dict[prefName] == 'object' &&
|
| + !this.registeredPreferences_[prefix + prefName]) {
|
| this.flattenMapAndDispatchEvent_(prefix + prefName + '.',
|
| dict[prefName]);
|
| } else {
|
|
|