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

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: 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
« no previous file with comments | « no previous file | 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..8459379842351c9d667b06641f39a3a9d7990b38 100644
--- a/net/test/test_server.cc
+++ b/net/test/test_server.cc
@@ -159,6 +159,8 @@ bool TestServer::Start() {
return false;
}
akalin 2010/12/08 15:02:34 Add a TODO(akalin) to add code to store all ports
Bernhard Bauer 2010/12/09 10:48:08 Done.
+ net::explicitly_allowed_ports.insert(host_port_pair_.port());
+
started_ = true;
return true;
}
@@ -181,6 +183,8 @@ bool TestServer::Stop() {
VLOG(1) << "Kill failed?";
}
+ net::explicitly_allowed_ports.erase(host_port_pair_.port());
+
return ret;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698