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

Side by Side Diff: net/test/local_sync_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: Fix nits 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "net/test/local_sync_test_server.h"
6
7 #include "base/values.h"
8 #include "net/test/test_server.h"
9
10 namespace net {
11
12 LocalSyncTestServer::LocalSyncTestServer()
13 : LocalTestServer(net::TestServer::TYPE_SYNC,
14 net::TestServer::kLocalhost,
15 FilePath()),
16 xmpp_port_(0) {}
17
18 LocalSyncTestServer::LocalSyncTestServer(uint16 port, uint16 xmpp_port)
19 : LocalTestServer(net::TestServer::TYPE_SYNC,
20 net::TestServer::kLocalhost,
21 FilePath()),
22 xmpp_port_(xmpp_port) {
23 SetPort(port);
24 }
25
26 LocalSyncTestServer::~LocalSyncTestServer() {}
27
28 bool LocalSyncTestServer::GenerateArguments(
29 base::DictionaryValue* arguments) const {
30 BaseTestServer::GenerateArguments(arguments);
31 if (xmpp_port_ != 0) {
32 arguments->SetInteger("xmpp-port", xmpp_port_);
33 }
34 return true;
35 }
36
37 void LocalSyncTestServer::CleanUpWhenStoppingServer() {
38 BaseTestServer::CleanUpWhenStoppingServer();
akalin 2012/05/23 06:16:49 why not LocalTestServer:: here instead? (even if i
Paweł Hajdan Jr. 2012/05/23 06:53:02 +1
Raghu Simha 2012/05/23 19:54:28 Moot.
Raghu Simha 2012/05/23 19:54:28 Good point. It's moot, though.
39 xmpp_port_ = 0;
40 }
41
42 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698