Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2167)

Unified Diff: chrome/browser/resources/net_internals/socketsview.js

Issue 6840022: net-internals: Add buttons to close idle and flush all sockets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/net_internals/main.js ('k') | chrome/browser/ui/webui/net_internals_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/net_internals/socketsview.js
===================================================================
--- chrome/browser/resources/net_internals/socketsview.js (revision 81416)
+++ chrome/browser/resources/net_internals/socketsview.js (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -11,12 +11,19 @@
*
* @constructor
*/
-function SocketsView(mainBoxId, socketPoolDivId, socketPoolGroupsDivId) {
+function SocketsView(mainBoxId, socketPoolDivId, socketPoolGroupsDivId,
+ closeIdleSocketsButtonId, socketPoolFlushButtonId) {
DivView.call(this, mainBoxId);
g_browser.addSocketPoolInfoObserver(this);
this.socketPoolDiv_ = document.getElementById(socketPoolDivId);
this.socketPoolGroupsDiv_ = document.getElementById(socketPoolGroupsDivId);
+
+ var closeIdleButton = document.getElementById(closeIdleSocketsButtonId);
+ closeIdleButton.onclick = this.closeIdleSockets.bind(this);
+
+ var flushSocketsButton = document.getElementById(socketPoolFlushButtonId);
+ flushSocketsButton.onclick = this.flushSocketPools.bind(this);
}
inherits(SocketsView, DivView);
@@ -42,3 +49,13 @@
}
}
};
+
+SocketsView.prototype.closeIdleSockets = function() {
+ g_browser.sendCloseIdleSockets();
+ g_browser.checkForUpdatedInfo(false);
+}
+
+SocketsView.prototype.flushSocketPools = function() {
+ g_browser.sendFlushSocketPools();
+ g_browser.checkForUpdatedInfo(false);
+}
« no previous file with comments | « chrome/browser/resources/net_internals/main.js ('k') | chrome/browser/ui/webui/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698