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

Unified Diff: net/test/test_server.cc

Issue 5519015: Explicitly whitelist the test server port. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add helper class for whitelisting. Created 10 years 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
« net/base/net_util.h ('K') | « net/test/test_server.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/test_server.cc
diff --git a/net/test/test_server.cc b/net/test/test_server.cc
index d2d3fdee6a44d1281faed61051b8051420a83ce5..f04c55ed4db6e6ca067277ec3f61ab09f2ddd1b2 100644
--- a/net/test/test_server.cc
+++ b/net/test/test_server.cc
@@ -159,6 +159,9 @@ bool TestServer::Start() {
return false;
}
+ // TODO(akalin): Automaticall whitelist all ports openened by the test server.
cbentzel 2010/12/09 14:25:13 This TODO isn't needed anymore.
+ allowed_port_.reset(new ScopedPortException(host_port_pair_.port()));
+
started_ = true;
return true;
}
@@ -181,6 +184,8 @@ bool TestServer::Stop() {
VLOG(1) << "Kill failed?";
}
+ allowed_port_.reset();
+
return ret;
}
« net/base/net_util.h ('K') | « net/test/test_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698