summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/net_internals/proxy_view.js
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-15 05:12:47 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-15 05:12:47 +0000
commit515177468b25f61284c8f54f2894f4806e6b0bd3 (patch)
tree627244616f447e0350c5c1574317bda6613393e2 /chrome/browser/resources/net_internals/proxy_view.js
parentc65c6e3150af3dc37471c76b10d2b05cf7367aa3 (diff)
downloadchromium_src-515177468b25f61284c8f54f2894f4806e6b0bd3.zip
chromium_src-515177468b25f61284c8f54f2894f4806e6b0bd3.tar.gz
chromium_src-515177468b25f61284c8f54f2894f4806e6b0bd3.tar.bz2
Remove PassiveLogCollector, and its supporting infrastructure.
This makes it so that about:net-internals no longer includes "passively captured" events. This wasn't a frequently used feature, yet was adding some memory bloat to the browser process. BUG=90789 Review URL: http://codereview.chromium.org/9363055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/net_internals/proxy_view.js')
-rw-r--r--chrome/browser/resources/net_internals/proxy_view.js71
1 files changed, 2 insertions, 69 deletions
diff --git a/chrome/browser/resources/net_internals/proxy_view.js b/chrome/browser/resources/net_internals/proxy_view.js
index e33589a..a97d36b 100644
--- a/chrome/browser/resources/net_internals/proxy_view.js
+++ b/chrome/browser/resources/net_internals/proxy_view.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,7 +7,6 @@
*
* - Shows the current proxy settings.
* - Has a button to reload these settings.
- * - Shows the log entries for the most recent PROXY_SCRIPT_DECIDER source
* - Shows the list of proxy hostnames that are cached as "bad".
* - Has a button to clear the cached bad proxies.
*/
@@ -26,8 +25,6 @@ var ProxyView = (function() {
// Call superclass's constructor.
superClass.call(this, ProxyView.MAIN_BOX_ID);
- this.latestProxySourceId_ = 0;
-
// Hook up the UI components.
$(ProxyView.RELOAD_SETTINGS_BUTTON_ID).onclick =
g_browser.sendReloadProxySettings.bind(g_browser);
@@ -37,7 +34,6 @@ var ProxyView = (function() {
// Register to receive proxy information as it changes.
g_browser.addProxySettingsObserver(this, true);
g_browser.addBadProxiesObserver(this, true);
- g_browser.sourceTracker.addSourceEntryObserver(this);
}
// ID for special HTML element in category_tabs.html
@@ -50,7 +46,6 @@ var ProxyView = (function() {
ProxyView.RELOAD_SETTINGS_BUTTON_ID = 'proxy-view-reload-settings';
ProxyView.BAD_PROXIES_TBODY_ID = 'proxy-view-bad-proxies-tbody';
ProxyView.CLEAR_BAD_PROXIES_BUTTON_ID = 'proxy-view-clear-bad-proxies';
- ProxyView.PROXY_RESOLVER_LOG_DIV_ID = 'proxy-view-resolver-log';
cr.addSingletonGetter(ProxyView);
@@ -58,32 +53,11 @@ var ProxyView = (function() {
// Inherit the superclass's methods.
__proto__: superClass.prototype,
- onLoadLogStart: function(data) {
- // Need to reset this so the latest proxy source from the dump can be
- // identified when the log entries are loaded.
- this.latestProxySourceId_ = 0;
- },
-
- onLoadLogFinish: function(data, tabData) {
- // It's possible that the last PROXY_SCRIPT_DECIDER source was deleted
- // from the log, but earlier sources remain. When that happens, clear the
- // list of entries here, to avoid displaying misleading information.
- if (tabData != this.latestProxySourceId_)
- this.clearLog_();
+ onLoadLogFinish: function(data) {
return this.onProxySettingsChanged(data.proxySettings) &&
this.onBadProxiesChanged(data.badProxies);
},
- /**
- * Save view-specific state.
- *
- * Save the greatest seen proxy source id, so we will not incorrectly
- * identify the log source associated with the current proxy configuration.
- */
- saveState: function() {
- return this.latestProxySourceId_;
- },
-
onProxySettingsChanged: function(proxySettings) {
// Both |original| and |effective| are dictionaries describing the
// settings.
@@ -123,47 +97,6 @@ var ProxyView = (function() {
addTextNode(badUntilCell, badUntilDate.toLocaleString());
}
return true;
- },
-
- /**
- * Called whenever SourceEntries are updated with new log entries. Updates
- * |proxyResolverLogPre_| with the log entries of the PROXY_SCRIPT_DECIDER
- * SourceEntry with the greatest id.
- */
- onSourceEntriesUpdated: function(sourceEntries) {
- for (var i = sourceEntries.length - 1; i >= 0; --i) {
- var sourceEntry = sourceEntries[i];
-
- if (sourceEntry.getSourceType() != LogSourceType.PROXY_SCRIPT_DECIDER ||
- this.latestProxySourceId_ > sourceEntry.getSourceId()) {
- continue;
- }
-
- this.latestProxySourceId_ = sourceEntry.getSourceId();
-
- $(ProxyView.PROXY_RESOLVER_LOG_DIV_ID).innerHTML = '';
- sourceEntry.printAsText($(ProxyView.PROXY_RESOLVER_LOG_DIV_ID));
- }
- },
-
- /**
- * Clears the display of and log entries for the last proxy lookup.
- */
- clearLog_: function() {
- // Prevents display of partial logs.
- ++this.latestProxySourceId_;
-
- $(ProxyView.PROXY_RESOLVER_LOG_DIV_ID).innerHTML = '';
- $(ProxyView.PROXY_RESOLVER_LOG_DIV_ID).innerText = 'Deleted.';
- },
-
- onSourceEntriesDeleted: function(sourceIds) {
- if (sourceIds.indexOf(this.latestProxySourceId_) != -1)
- this.clearLog_();
- },
-
- onAllSourceEntriesDeleted: function() {
- this.clearLog_();
}
};