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

Unified Diff: net/test/base_test_server.cc

Issue 10388206: [sync] Add --port and --xmpp-port parameters to run_testserver.cc (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: "" Created 8 years, 7 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
Index: net/test/base_test_server.cc
diff --git a/net/test/base_test_server.cc b/net/test/base_test_server.cc
index 07bef89744d1bc25dd473c6d806083b180b19a7a..e8651951995145856a3db76d5b4e8ad99717589d 100644
--- a/net/test/base_test_server.cc
+++ b/net/test/base_test_server.cc
@@ -176,7 +176,7 @@ bool BaseTestServer::GetAddressList(AddressList* address_list) const {
return true;
}
-uint16 BaseTestServer::GetPort() {
+uint16 BaseTestServer::GetPort() const {
return host_port_pair_.port();
}
@@ -184,6 +184,14 @@ void BaseTestServer::SetPort(uint16 port) {
host_port_pair_.set_port(port);
}
+uint16 BaseTestServer::GetXmppPort() const {
+ return xmpp_port_;
+}
+
+void BaseTestServer::SetXmppPort(uint16 xmpp_port) {
+ xmpp_port_ = xmpp_port;
+}
+
GURL BaseTestServer::GetURL(const std::string& path) const {
return GURL(GetScheme() + "://" + host_port_pair_.ToString() + "/" + path);
}
@@ -327,6 +335,10 @@ bool BaseTestServer::GenerateArguments(base::DictionaryValue* arguments) const {
arguments->SetInteger("port", host_port_pair_.port());
arguments->SetString("data-dir", document_root_.value());
+ if (type_ == TYPE_SYNC && xmpp_port_ != 0) {
+ arguments->SetInteger("xmpp-port", xmpp_port_);
+ }
+
if (VLOG_IS_ON(1) || log_to_console_)
arguments->Set("log-to-console", base::Value::CreateNullValue());

Powered by Google App Engine
This is Rietveld 408576698