summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-28 01:17:56 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-28 01:17:56 +0000
commitd747ef3e95dbcae4f31d6584c150cafd15e7feb4 (patch)
tree17fbfb8acbda36ea80e288aca2fea319e79075d4 /chrome/browser/resources
parentfacefc587f0124781b9dd08f91ebe03019afb51e (diff)
downloadchromium_src-d747ef3e95dbcae4f31d6584c150cafd15e7feb4.zip
chromium_src-d747ef3e95dbcae4f31d6584c150cafd15e7feb4.tar.gz
chromium_src-d747ef3e95dbcae4f31d6584c150cafd15e7feb4.tar.bz2
Display the "effective" proxy settings in about:net-internals.
The "effective" settings is what you get after applying the various fallbacks between automatic and manual settings. This display makes it easier to notice whether "auto-detect" actually took effect, and if so what was the PAC URL it used. BUG=53549 TEST=On windows change your proxy settings to include both auto-detect, a custom pac script, and some manually configured proxy servers. Now run chrome and go to the proxy tab on about:net-internals. Check that the "original" settings is what you entered in the dialog box, however the "effective" settings will only be a subset of them. Review URL: http://codereview.chromium.org/3241002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r--chrome/browser/resources/net_internals/index.html20
-rw-r--r--chrome/browser/resources/net_internals/main.js15
-rw-r--r--chrome/browser/resources/net_internals/proxyview.js20
3 files changed, 46 insertions, 9 deletions
diff --git a/chrome/browser/resources/net_internals/index.html b/chrome/browser/resources/net_internals/index.html
index 3a37aa0..86e1aa6 100644
--- a/chrome/browser/resources/net_internals/index.html
+++ b/chrome/browser/resources/net_internals/index.html
@@ -42,9 +42,25 @@ found in the LICENSE file.
<div id=proxyTabContent>
<h4>
Current proxy settings
- <input type=button value="Reload settings" id=proxyReloadSettings />
+ <input type=button value="Re-apply settings" id=proxyReloadSettings />
</h4>
- <pre id=proxyCurrentConfig></pre>
+
+ <table><tr>
+
+ <td valign=top>
+ <h3>Effective settings</h3>
+ <pre id=proxyEffectiveSettings></pre>
+ </pre>
+ </td>
+
+ <td style='width: 30px'>&nbsp;</td>
+
+ <td valign=top>
+ <h3>Original settings</h3>
+ <pre id=proxyOriginalSettings></pre>
+ </td>
+
+ </tr></table>
<h4>
Proxies which have failed recently, and are marked as bad
diff --git a/chrome/browser/resources/net_internals/main.js b/chrome/browser/resources/net_internals/main.js
index d9c20ee..03f48083 100644
--- a/chrome/browser/resources/net_internals/main.js
+++ b/chrome/browser/resources/net_internals/main.js
@@ -50,7 +50,8 @@ function onLoaded() {
// Create a view which will display info on the proxy setup.
var proxyView = new ProxyView("proxyTabContent",
- "proxyCurrentConfig",
+ "proxyOriginalSettings",
+ "proxyEffectiveSettings",
"proxyReloadSettings",
"badProxiesTableBody",
"clearBadProxies");
@@ -320,7 +321,17 @@ BrowserBridge.prototype.addLogObserver = function(observer) {
*
* observer.onProxySettingsChanged(proxySettings)
*
- * |proxySettings| is a formatted string describing the settings.
+ * |proxySettings| is a dictionary with (up to) two properties:
+ *
+ * "original" -- The settings that chrome was configured to use
+ * (i.e. system settings.)
+ * "effective" -- The "effective" proxy settings that chrome is using.
+ * (decides between the manual/automatic modes of the
+ * fetched settings).
+ *
+ * Each of these two configurations is formatted as a string, and may be
+ * omitted if not yet initialized.
+ *
* TODO(eroman): send a dictionary instead.
*/
BrowserBridge.prototype.addProxySettingsObserver = function(observer) {
diff --git a/chrome/browser/resources/net_internals/proxyview.js b/chrome/browser/resources/net_internals/proxyview.js
index 4d7d885..df3ea6b 100644
--- a/chrome/browser/resources/net_internals/proxyview.js
+++ b/chrome/browser/resources/net_internals/proxyview.js
@@ -13,14 +13,17 @@
* @constructor
*/
function ProxyView(mainBoxId,
- currentConfigDivId,
+ originalSettingsDivId,
+ effectiveSettingsDivId,
reloadSettingsButtonId,
badProxiesTbodyId,
clearBadProxiesButtonId) {
DivView.call(this, mainBoxId);
// Hook up the UI components.
- this.currentConfigDiv_ = document.getElementById(currentConfigDivId);
+ this.originalSettingsDiv_ = document.getElementById(originalSettingsDivId);
+ this.effectiveSettingsDiv_ =
+ document.getElementById(effectiveSettingsDivId);
this.badProxiesTbody_ = document.getElementById(badProxiesTbodyId);
var reloadSettingsButton = document.getElementById(reloadSettingsButtonId);
@@ -38,9 +41,16 @@ function ProxyView(mainBoxId,
inherits(ProxyView, DivView);
ProxyView.prototype.onProxySettingsChanged = function(proxySettings) {
- // |proxySettings| is a formatted string describing the settings.
- this.currentConfigDiv_.innerHTML = ''
- addTextNode(this.currentConfigDiv_, proxySettings);
+ var original = proxySettings.original;
+ var effective = proxySettings.effective;
+
+ // Both |original| and |effective| are formatted strings describing the
+ // settings.
+ this.originalSettingsDiv_.innerHTML = ''
+ this.effectiveSettingsDiv_.innerHTML = ''
+
+ addTextNode(this.originalSettingsDiv_, original);
+ addTextNode(this.effectiveSettingsDiv_, effective);
};
ProxyView.prototype.onBadProxiesChanged = function(badProxies) {