diff options
author | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 19:03:23 +0000 |
---|---|---|
committer | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 19:03:23 +0000 |
commit | 8b001f3e36a29f590e57d46e8e1b357685eb38c1 (patch) | |
tree | b522039770a7cd9bd77598cf5cc070f984f78ae8 /chrome/common/extensions/docs | |
parent | 248075e81cfc2a529bcb54cd095f82baee313385 (diff) | |
download | chromium_src-8b001f3e36a29f590e57d46e8e1b357685eb38c1.zip chromium_src-8b001f3e36a29f590e57d46e8e1b357685eb38c1.tar.gz chromium_src-8b001f3e36a29f590e57d46e8e1b357685eb38c1.tar.bz2 |
Disable setting incognito prefs for extensions for now.
BUG=60099
TEST=no
Review URL: http://codereview.chromium.org/6990054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86666 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs')
8 files changed, 34 insertions, 26 deletions
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip b/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip Binary files differindex fa7b74b..519a08a 100644 --- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip +++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html index 9152e24..041da4c 100644 --- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html +++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html @@ -168,6 +168,10 @@ font-size: 1.1em; } + button[value="incognito"] { + display: none; + } + .overlay { display: block; text-align: center; diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/proxy_form_controller.js b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/proxy_form_controller.js index 796d7b0..3350cf3 100644 --- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/proxy_form_controller.js +++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/proxy_form_controller.js @@ -100,7 +100,9 @@ ProxyFormController.WrappedProxyConfig; * @static */ ProxyFormController.getPersistedSettings = function() { - var result = JSON.parse(window.localStorage['proxyConfig']); + var result = null; + if (window.localStorage['proxyConfig'] !== undefined) + result = JSON.parse(window.localStorage['proxyConfig']); return result ? result : null; }; @@ -353,7 +355,8 @@ ProxyFormController.prototype = { }, /** - * Handles the response from 'proxy.settings.get' for regular settings. + * Handles the response from 'proxy.settings.get' for regular + * settings. * * @param {ProxyFormController.WrappedProxyConfig} c The proxy data and * extension's level of control thereof. @@ -370,7 +373,8 @@ ProxyFormController.prototype = { }, /** - * Handles the response from 'proxy.settings.get' for incognito settings. + * Handles the response from 'proxy.settings.get' for incognito + * settings. * * @param {ProxyFormController.WrappedProxyConfig} c The proxy data and * extension's level of control thereof. @@ -505,7 +509,7 @@ ProxyFormController.prototype = { this.config_.regular = this.generateProxyConfig_(); chrome.experimental.proxy.settings.set( - {value: this.config_.regular, incognito: false}, + {value: this.config_.regular, scope: 'regular'}, this.callbackForRegularSettings_.bind(this)); }, @@ -521,9 +525,10 @@ ProxyFormController.prototype = { return; } if (this.config_.incognito) { - chrome.experimental.proxy.settings.set( - {value: this.config_.incognito, incognito: true}, - this.callbackForIncognitoSettings_.bind(this)); + // TODO(battre): change incognito value once available + // chrome.experimental.proxy.settings.set( + // {value: this.config_.incognito, scope: 'incognito'}, + // this.callbackForIncognitoSettings_.bind(this)); } else { ProxyFormController.setPersistedSettings(this.config_); this.generateAlert_(chrome.i18n.getMessage('successfullySetProxy')); diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/test/proxy_form_controller_test.js b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/test/proxy_form_controller_test.js index b577cb6..d56a2fc 100644 --- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/test/proxy_form_controller_test.js +++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/test/proxy_form_controller_test.js @@ -136,9 +136,8 @@ var proxyform = new Test.Unit.Runner({ }, // On instantiation, ProxyFormController should read the current state - // from `chrome.experimental.getCurrentProxySettings`, and react - // accordingly. Let's see if that happens with the next four sets of - // assertsions. + // from `chrome.experimental.proxy.get`, and react accordingly. + // Let's see if that happens with the next four sets of assertsions. testSetupFormSystem: function() { chrome.experimental.proxy.settings.get = mockFunctionFactory({ value: {mode: 'system'}, diff --git a/chrome/common/extensions/docs/experimental.extension.html b/chrome/common/extensions/docs/experimental.extension.html index 8665e10..bb92fd8 100644 --- a/chrome/common/extensions/docs/experimental.extension.html +++ b/chrome/common/extensions/docs/experimental.extension.html @@ -585,7 +585,7 @@ <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>What setting to clear.</dd> + <dd>What preference to clear.</dd> <dd style="display: none; "> This parameter was added in version <b><span></span></b>. @@ -602,14 +602,14 @@ <div> <div> <dt> - <var>incognito</var> + <var>scope</var> <em> <!-- TYPE --> <div style="display:inline"> ( <span class="optional">optional</span> - <span class="enum" style="display: none; ">enumerated</span> + <span class="enum">enumerated</span> <span id="typeTemplate"> <span style="display: none; "> <a> Type</a> @@ -618,8 +618,8 @@ <span style="display: none; "> array of <span><span></span></span> </span> - <span>boolean</span> - <span style="display: none; "></span> + <span>string</span> + <span>["regular"]</span> </span> </span> ) @@ -630,7 +630,7 @@ <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>Whether to clear the setting for the incognito session only (default false).</dd> + <dd>Where to clear the preference (default: regular). 'regular' = preference for regular profile (which is inherited by the incognito profile if not overridden elsewhere).</dd> <dd style="display: none; "> This parameter was added in version <b><span></span></b>. @@ -1464,14 +1464,14 @@ </div><div> <div> <dt> - <var>incognito</var> + <var>scope</var> <em> <!-- TYPE --> <div style="display:inline"> ( <span class="optional">optional</span> - <span class="enum" style="display: none; ">enumerated</span> + <span class="enum">enumerated</span> <span id="typeTemplate"> <span style="display: none; "> <a> Type</a> @@ -1480,8 +1480,8 @@ <span style="display: none; "> array of <span><span></span></span> </span> - <span>boolean</span> - <span style="display: none; "></span> + <span>string</span> + <span>["regular"]</span> </span> </span> ) @@ -1492,7 +1492,7 @@ <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>Whether to modify the setting for the incognito session only (default false).</dd> + <dd>Where to set the preference (default: regular). 'regular' = preference for regular profile (which is inherited by the incognito profile if not overridden elsewhere).</dd> <dd style="display: none; "> This parameter was added in version <b><span></span></b>. diff --git a/chrome/common/extensions/docs/experimental.proxy.html b/chrome/common/extensions/docs/experimental.proxy.html index 4010576..20867e8 100644 --- a/chrome/common/extensions/docs/experimental.proxy.html +++ b/chrome/common/extensions/docs/experimental.proxy.html @@ -563,7 +563,7 @@ apply to regular and incognito windows. } }; chrome.experimental.proxy.settings.set( - {'value': config, 'incognito': false}, + {value: config, scope: 'regular'}, function() {}); </pre> @@ -582,7 +582,7 @@ The following code sets a custom pac script. } }; chrome.experimental.proxy.settings.set( - {'value': config, 'incognito': false}, + {value: config, scope: 'regular'}, function() {}); </pre> diff --git a/chrome/common/extensions/docs/samples.json b/chrome/common/extensions/docs/samples.json index 1b44c34..ccd354c 100644 --- a/chrome/common/extensions/docs/samples.json +++ b/chrome/common/extensions/docs/samples.json @@ -1561,7 +1561,7 @@ "test\/proxy_form_controller_test.js", "test\/unittest.css" ], - "source_hash": "7b3ff4599334eaa9f50aa70940bb5dead970665f", + "source_hash": "d4a52c15b1e5c8be5b26fe9305cf4aae0f2b0cc3", "zip_path": "examples\/extensions\/proxy_configuration.zip" }, { diff --git a/chrome/common/extensions/docs/static/experimental.proxy.html b/chrome/common/extensions/docs/static/experimental.proxy.html index 4e7f066..d391a95 100644 --- a/chrome/common/extensions/docs/static/experimental.proxy.html +++ b/chrome/common/extensions/docs/static/experimental.proxy.html @@ -218,7 +218,7 @@ var config = { } }; chrome.experimental.proxy.settings.set( - {'value': config, 'incognito': false}, + {value: config, scope: 'regular'}, function() {}); </pre> @@ -238,7 +238,7 @@ var config = { } }; chrome.experimental.proxy.settings.set( - {'value': config, 'incognito': false}, + {value: config, scope: 'regular'}, function() {}); </pre> |