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

Unified Diff: net/test/local_sync_test_server.h

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 compile with OVERRIDE 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/local_sync_test_server.h
diff --git a/net/test/local_sync_test_server.h b/net/test/local_sync_test_server.h
new file mode 100644
index 0000000000000000000000000000000000000000..bdb05b0b0f6f0c06eea3530b9053aed53eb8fd44
--- /dev/null
+++ b/net/test/local_sync_test_server.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 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.
+
+#ifndef NET_TEST_LOCAL_SYNC_TEST_SERVER_H_
+#define NET_TEST_LOCAL_SYNC_TEST_SERVER_H_
+#pragma once
+
+#include "net/test/local_test_server.h"
+
+namespace net {
+
+// Runs a Python-based sync test server on the same machine in which the
+// LocalSyncTestServer runs.
+class LocalSyncTestServer : public LocalTestServer {
+ public:
+ // Initialize a sync server that listens on localhost using ephemeral ports
+ // for sync and p2p notifications.
+ LocalSyncTestServer();
+
+ // Initialize a sync server that listens on |port| for sync updates and
+ // |xmpp_port| for p2p notifications.
+ LocalSyncTestServer(uint16 port, uint16 xmpp_port);
+
+ virtual ~LocalSyncTestServer();
+
+ // Calls BaseTestServer::GenerateArguments and adds sync specific arguments.
+ virtual bool GenerateArguments(
+ base::DictionaryValue* arguments) const OVERRIDE;
+
+ // Clean up internal status before stopping the server.
+ virtual void CleanUpWhenStoppingServer() OVERRIDE;
akalin 2012/05/23 05:29:21 #include base/compiler_specific.h for OVERRIDE
Raghu Simha 2012/05/23 06:02:59 Done.
+
+ private:
+ // Port on which the Sync XMPP server listens.
+ uint16 xmpp_port_;
+
+ DISALLOW_COPY_AND_ASSIGN(LocalSyncTestServer);
akalin 2012/05/23 05:29:21 #include base/basictypes.h for this
Raghu Simha 2012/05/23 06:02:59 Done.
+};
+
+} // namespace net
+
+#endif // NET_TEST_LOCAL_SYNC_TEST_SERVER_H_

Powered by Google App Engine
This is Rietveld 408576698