diff options
author | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-24 12:41:46 +0000 |
---|---|---|
committer | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-24 12:41:46 +0000 |
commit | ccfdfbdf29c2c0a2042d1d090f3f0f1172e65890 (patch) | |
tree | 93a4283fd5784a564845076505056f6e0d393b8d /chrome/renderer/resources/extension_process_bindings.js | |
parent | 613409bb31cfbee5cd0a0b8f2b372f6c41df1b86 (diff) | |
download | chromium_src-ccfdfbdf29c2c0a2042d1d090f3f0f1172e65890.zip chromium_src-ccfdfbdf29c2c0a2042d1d090f3f0f1172e65890.tar.gz chromium_src-ccfdfbdf29c2c0a2042d1d090f3f0f1172e65890.tar.bz2 |
Migrated Proxy Settings API to mechanisms of Content Settings API
BUG=73295
TEST=execute ProxySettingsApiTest.* browser_tests
Review URL: http://codereview.chromium.org/6531036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75875 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/resources/extension_process_bindings.js')
-rw-r--r-- | chrome/renderer/resources/extension_process_bindings.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js index 94accee..348f1ed 100644 --- a/chrome/renderer/resources/extension_process_bindings.js +++ b/chrome/renderer/resources/extension_process_bindings.js @@ -320,23 +320,24 @@ var chrome = chrome || {}; var customBindings = {}; function setupPreferences() { - customBindings['Preference'] = function(prefKey, valueSchema) { - var getSchema = this.parameters.get; - var extendedGetSchema = extendSchema(getSchema); + customBindings['Preference'] = + function(prefKey, valueSchema, customHandlers) { + if (customHandlers === undefined) + customHandlers = {}; this.get = function(details, callback) { + var getSchema = this.parameters.get; chromeHidden.validate([details, callback], getSchema); - return sendRequest('experimental.preferences.get', + return sendRequest(customHandlers.get || 'experimental.preferences.get', [prefKey, details, callback], - extendedGetSchema); + extendSchema(getSchema)); }; - var setSchema = this.parameters.set.slice(); - setSchema[0].properties.value = valueSchema; - var extendedSetSchema = extendSchema(setSchema); this.set = function(details, callback) { + var setSchema = this.parameters.set.slice(); + setSchema[0].properties.value = valueSchema; chromeHidden.validate([details, callback], setSchema); - return sendRequest('experimental.preferences.set', + return sendRequest(customHandlers.set || 'experimental.preferences.set', [prefKey, details, callback], - extendedSetSchema); + extendSchema(setSchema)); }; }; customBindings['Preference'].prototype = new CustomBindingsObject(); |