summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-15 19:40:23 +0000
committerasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-15 19:40:23 +0000
commit8e9f7bb27813e583db6964fe1c2ea0c0bc3b3a3a (patch)
tree943a591b304373414328498180ed18e78cc9eb34
parent248db980f0819ad76c7c987f835ba06bfea77281 (diff)
downloadchromium_src-8e9f7bb27813e583db6964fe1c2ea0c0bc3b3a3a.zip
chromium_src-8e9f7bb27813e583db6964fe1c2ea0c0bc3b3a3a.tar.gz
chromium_src-8e9f7bb27813e583db6964fe1c2ea0c0bc3b3a3a.tar.bz2
Show source of proxy settings in net-internals.
The source of proxy settings is now recorded in the NetLog. Display the source in the Proxy tab and in PROXY_CONFIG_CHANGED events. BUG=none TEST=browser_tests --gtest_filter=NetInternalsTest.netInternalsLogViewPainterPrintAsText Review URL: https://chromiumcodereview.appspot.com/10535176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142448 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/net_internals/log_view_painter.js27
-rw-r--r--chrome/test/data/webui/net_internals/log_view_painter.js6
2 files changed, 19 insertions, 14 deletions
diff --git a/chrome/browser/resources/net_internals/log_view_painter.js b/chrome/browser/resources/net_internals/log_view_painter.js
index a1f0ef0..18cc89a 100644
--- a/chrome/browser/resources/net_internals/log_view_painter.js
+++ b/chrome/browser/resources/net_internals/log_view_painter.js
@@ -590,19 +590,22 @@ proxySettingsToString = function(config) {
modes.push(lines);
}
- // If we didn't find any proxy settings modes, we are using DIRECT.
- if (modes.length < 1)
- return 'Use DIRECT connections.';
-
- // If there was just one mode, don't bother numbering it.
- if (modes.length == 1)
- return modes[0].join('\n');
-
- // Otherwise concatenate all of the modes into a numbered list
- // (which correspond with the fallback order).
var result = [];
- for (var i = 0; i < modes.length; ++i)
- result.push(indentLines('(' + (i + 1) + ') ', modes[i]));
+ if (modes.length < 1) {
+ // If we didn't find any proxy settings modes, we are using DIRECT.
+ result.push('Use DIRECT connections.');
+ } else if (modes.length == 1) {
+ // If there was just one mode, don't bother numbering it.
+ result.push(modes[0].join('\n'));
+ } else {
+ // Otherwise concatenate all of the modes into a numbered list
+ // (which correspond with the fallback order).
+ for (var i = 0; i < modes.length; ++i)
+ result.push(indentLines('(' + (i + 1) + ') ', modes[i]));
+ }
+
+ if (config.source != undefined && config.source != 'UNKNOWN')
+ result.push('Source: ' + config.source);
return result.join('\n');
};
diff --git a/chrome/test/data/webui/net_internals/log_view_painter.js b/chrome/test/data/webui/net_internals/log_view_painter.js
index ea03f6a..7d90d02 100644
--- a/chrome/test/data/webui/net_internals/log_view_painter.js
+++ b/chrome/test/data/webui/net_internals/log_view_painter.js
@@ -1167,7 +1167,8 @@ function painterTestProxyConfig() {
'<local>'
],
'pac_url': 'https://config/wpad.dat',
- 'single_proxy': 'cache-proxy:3128'
+ 'single_proxy': 'cache-proxy:3128',
+ 'source': 'SYSTEM'
},
'old_config': {
'auto_detect': true
@@ -1194,7 +1195,8 @@ function painterTestProxyConfig() {
' Bypass list: \n' +
' *.local\n' +
' foo\n' +
- ' <local>';
+ ' <local>\n' +
+ ' Source: SYSTEM';
return testCase;
}