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

Side by Side Diff: sync/test/local_sync_test_server.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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
« no previous file with comments | « sync/test/fake_sync_encryption_handler.cc ('k') | sync/test/local_sync_test_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 #ifndef SYNC_TEST_LOCAL_SYNC_TEST_SERVER_H_
6 #define SYNC_TEST_LOCAL_SYNC_TEST_SERVER_H_
7
8 #include <stdint.h>
9
10 #include "base/compiler_specific.h"
11 #include "base/macros.h"
12 #include "net/test/spawned_test_server/local_test_server.h"
13
14 namespace syncer {
15
16 // Runs a Python-based sync test server on the same machine on which the
17 // LocalSyncTestServer runs.
18 class LocalSyncTestServer : public net::LocalTestServer {
19 public:
20 // Initialize a sync server that listens on localhost using ephemeral ports
21 // for sync and p2p notifications.
22 LocalSyncTestServer();
23
24 // Initialize a sync server that listens on |port| for sync updates and
25 // |xmpp_port| for p2p notifications.
26 LocalSyncTestServer(uint16_t port, uint16_t xmpp_port);
27
28 ~LocalSyncTestServer() override;
29
30 // Overriden from net::LocalTestServer.
31 bool AddCommandLineArguments(base::CommandLine* command_line) const override;
32 bool SetPythonPath() const override;
33 bool GetTestServerPath(base::FilePath* testserver_path) const override;
34
35 // Returns true if the path to |test_script_name| is successfully stored in
36 // |*test_script_path|. Used by the run_sync_testserver executable.
37 bool GetTestScriptPath(const base::FilePath::StringType& test_script_name,
38 base::FilePath* test_script_path) const;
39
40 private:
41 // Port on which the Sync XMPP server listens.
42 uint16_t xmpp_port_;
43
44 DISALLOW_COPY_AND_ASSIGN(LocalSyncTestServer);
45 };
46
47 } // namespace syncer
48
49 #endif // SYNC_TEST_LOCAL_SYNC_TEST_SERVER_H_
OLDNEW
« no previous file with comments | « sync/test/fake_sync_encryption_handler.cc ('k') | sync/test/local_sync_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698