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

Side by Side Diff: net/test/spawner_communicator.h

Issue 9704008: Make the SpawnerCommunicator destructor virtual since it inherits from net::URLRequest::Delegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: make BaseTestServer's dtor virtual per chat w/ Ryan Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « net/test/remote_test_server.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_TEST_SPAWNER_COMMUNICATOR_H_ 5 #ifndef NET_TEST_SPAWNER_COMMUNICATOR_H_
6 #define NET_TEST_SPAWNER_COMMUNICATOR_H_ 6 #define NET_TEST_SPAWNER_COMMUNICATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Method: "GET". 55 // Method: "GET".
56 // Data to server: None. 56 // Data to server: None.
57 // Data from server: String "ready" returned if success. 57 // Data from server: String "ready" returned if success.
58 // 58 //
59 // The internal I/O thread is required by net stack to perform net I/O. 59 // The internal I/O thread is required by net stack to perform net I/O.
60 // The Start/StopServer methods block the caller thread until result is 60 // The Start/StopServer methods block the caller thread until result is
61 // fetched from spawner server or timed-out. 61 // fetched from spawner server or timed-out.
62 class SpawnerCommunicator : public net::URLRequest::Delegate { 62 class SpawnerCommunicator : public net::URLRequest::Delegate {
63 public: 63 public:
64 explicit SpawnerCommunicator(uint16 port); 64 explicit SpawnerCommunicator(uint16 port);
65 ~SpawnerCommunicator(); 65 virtual ~SpawnerCommunicator();
66 66
67 // Starts an instance of the Python test server on the host/ machine. 67 // Starts an instance of the Python test server on the host/ machine.
68 // If successfully started, returns true, setting |*port| to the port 68 // If successfully started, returns true, setting |*port| to the port
69 // on the local machine that can be used to communicate with the remote 69 // on the local machine that can be used to communicate with the remote
70 // test server. 70 // test server.
71 bool StartServer(const std::string& arguments, 71 bool StartServer(const std::string& arguments,
72 uint16* port) WARN_UNUSED_RESULT; 72 uint16* port) WARN_UNUSED_RESULT;
73 73
74 bool StopServer() WARN_UNUSED_RESULT; 74 bool StopServer() WARN_UNUSED_RESULT;
75 75
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Only gets/sets |is_running_| on user's thread to avoid race-condition. 141 // Only gets/sets |is_running_| on user's thread to avoid race-condition.
142 bool is_running_; 142 bool is_running_;
143 143
144 DISALLOW_COPY_AND_ASSIGN(SpawnerCommunicator); 144 DISALLOW_COPY_AND_ASSIGN(SpawnerCommunicator);
145 }; 145 };
146 146
147 } // namespace net 147 } // namespace net
148 148
149 #endif // NET_TEST_SPAWNER_COMMUNICATOR_H_ 149 #endif // NET_TEST_SPAWNER_COMMUNICATOR_H_
150 150
OLDNEW
« no previous file with comments | « net/test/remote_test_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698