summaryrefslogtreecommitdiffstats
path: root/net/test
diff options
context:
space:
mode:
authorjnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 08:39:24 +0000
committerjnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 08:39:24 +0000
commitebb7c1fd09da624d9cd44570ff8086e5051b1811 (patch)
tree739afd7f850ebe5de23d70604837aba995d9a2ef /net/test
parent01b84957e5958c9acc60d0b26a9ba956e41cfb96 (diff)
downloadchromium_src-ebb7c1fd09da624d9cd44570ff8086e5051b1811.zip
chromium_src-ebb7c1fd09da624d9cd44570ff8086e5051b1811.tar.gz
chromium_src-ebb7c1fd09da624d9cd44570ff8086e5051b1811.tar.bz2
Make the SpawnerCommunicator destructor virtual since it inherits from net::URLRequest::Delegate
Also make BaseTestServer's dtor virtual protected to prevent the BaseTestServer pointer being directly deleted. BUG=None TEST=net_unittests should pass. Review URL: https://chromiumcodereview.appspot.com/9704008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126865 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test')
-rw-r--r--net/test/base_test_server.h3
-rw-r--r--net/test/local_test_server.h2
-rw-r--r--net/test/remote_test_server.h2
-rw-r--r--net/test/spawner_communicator.h2
4 files changed, 4 insertions, 5 deletions
diff --git a/net/test/base_test_server.h b/net/test/base_test_server.h
index 38f755d..7264a65 100644
--- a/net/test/base_test_server.h
+++ b/net/test/base_test_server.h
@@ -119,8 +119,6 @@ class BaseTestServer {
// Initialize a HTTPS TestServer with a specific set of HTTPSOptions.
explicit BaseTestServer(const HTTPSOptions& https_options);
- ~BaseTestServer();
-
// Returns the host port pair used by current Python based test server only
// if the server is started.
const HostPortPair& host_port_pair() const;
@@ -145,6 +143,7 @@ class BaseTestServer {
std::string* replacement_path);
protected:
+ virtual ~BaseTestServer();
Type type() const { return type_; }
// Gets port currently assigned to host_port_pair_ without checking
diff --git a/net/test/local_test_server.h b/net/test/local_test_server.h
index 90ba160..63ea00e 100644
--- a/net/test/local_test_server.h
+++ b/net/test/local_test_server.h
@@ -35,7 +35,7 @@ class LocalTestServer : public BaseTestServer {
LocalTestServer(const HTTPSOptions& https_options,
const FilePath& document_root);
- ~LocalTestServer();
+ virtual ~LocalTestServer();
bool Start() WARN_UNUSED_RESULT;
diff --git a/net/test/remote_test_server.h b/net/test/remote_test_server.h
index 1f375cb..737b733 100644
--- a/net/test/remote_test_server.h
+++ b/net/test/remote_test_server.h
@@ -29,7 +29,7 @@ class RemoteTestServer : public BaseTestServer {
RemoteTestServer(const HTTPSOptions& https_options,
const FilePath& document_root);
- ~RemoteTestServer();
+ virtual ~RemoteTestServer();
// Starts the Python test server on the host, instead of on the device.
bool Start() WARN_UNUSED_RESULT;
diff --git a/net/test/spawner_communicator.h b/net/test/spawner_communicator.h
index 43068f5..42afb41 100644
--- a/net/test/spawner_communicator.h
+++ b/net/test/spawner_communicator.h
@@ -62,7 +62,7 @@ class ScopedPortException;
class SpawnerCommunicator : public net::URLRequest::Delegate {
public:
explicit SpawnerCommunicator(uint16 port);
- ~SpawnerCommunicator();
+ virtual ~SpawnerCommunicator();
// Starts an instance of the Python test server on the host/ machine.
// If successfully started, returns true, setting |*port| to the port