summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-29 00:11:41 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-29 00:11:41 +0000
commite0845d5f582add16baf03fcd32ef6f9001b3e347 (patch)
tree629981a80136ed3f3fefe4366e51bf76f4adf4ab /net
parentf89f3234d24b0e46bfa69139e6d4a5dae3acc8b5 (diff)
downloadchromium_src-e0845d5f582add16baf03fcd32ef6f9001b3e347.zip
chromium_src-e0845d5f582add16baf03fcd32ef6f9001b3e347.tar.gz
chromium_src-e0845d5f582add16baf03fcd32ef6f9001b3e347.tar.bz2
RefCounted types should not have public destructors, net/ edition
BUG=123295 TEST=existing Review URL: https://chromiumcodereview.appspot.com/10417002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139272 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/net_log.h4
-rw-r--r--net/base/network_change_notifier.h17
-rw-r--r--net/base/stream_listen_socket.h5
-rw-r--r--net/curvecp/packetizer.h5
-rw-r--r--net/disk_cache/file.h5
-rw-r--r--net/socket_stream/socket_stream.h5
-rw-r--r--net/spdy/buffered_spdy_framer.h4
-rw-r--r--net/spdy/spdy_websocket_stream.h3
-rw-r--r--net/url_request/url_request.h5
9 files changed, 31 insertions, 22 deletions
diff --git a/net/base/net_log.h b/net/base/net_log.h
index 1984abf..777bdf5 100644
--- a/net/base/net_log.h
+++ b/net/base/net_log.h
@@ -121,7 +121,6 @@ class NET_EXPORT NetLog {
// Observers must stop watching a NetLog before either the Observer or the
// NetLog is destroyed.
ThreadSafeObserver();
- virtual ~ThreadSafeObserver();
// Returns the minimum log level for events this observer wants to
// receive. Must not be called when not watching a NetLog.
@@ -153,6 +152,9 @@ class NET_EXPORT NetLog {
EventPhase phase,
EventParameters* params) = 0;
+ protected:
+ virtual ~ThreadSafeObserver();
+
private:
friend class NetLog;
diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h
index 20ee6eb..f527acd 100644
--- a/net/base/network_change_notifier.h
+++ b/net/base/network_change_notifier.h
@@ -52,14 +52,13 @@ class NET_EXPORT NetworkChangeNotifier {
class NET_EXPORT IPAddressObserver {
public:
- virtual ~IPAddressObserver() {}
-
// Will be called when the IP address of the primary interface changes.
// This includes when the primary interface itself changes.
virtual void OnIPAddressChanged() = 0;
protected:
IPAddressObserver() {}
+ virtual ~IPAddressObserver() {}
private:
DISALLOW_COPY_AND_ASSIGN(IPAddressObserver);
@@ -67,16 +66,15 @@ class NET_EXPORT NetworkChangeNotifier {
class NET_EXPORT ConnectionTypeObserver {
public:
- virtual ~ConnectionTypeObserver() {}
-
- // Will be called when the connection type of the system has changed.
- // See NetworkChangeNotifier::GetConnectionType() for important caveats
- // about the unreliability of using this signal to infer the ability to
- // reach remote sites.
+ // Will be called when the connection type of the system has changed.
+ // See NetworkChangeNotifier::GetConnectionType() for important caveats
+ // about the unreliability of using this signal to infer the ability to
+ // reach remote sites.
virtual void OnConnectionTypeChanged(ConnectionType type) = 0;
protected:
ConnectionTypeObserver() {}
+ virtual ~ConnectionTypeObserver() {}
private:
DISALLOW_COPY_AND_ASSIGN(ConnectionTypeObserver);
@@ -84,14 +82,13 @@ class NET_EXPORT NetworkChangeNotifier {
class NET_EXPORT DNSObserver {
public:
- virtual ~DNSObserver() {}
-
// Will be called when the DNS settings of the system may have changed.
// The flags set in |detail| provide the specific set of changes.
virtual void OnDNSChanged(unsigned detail) = 0;
protected:
DNSObserver() {}
+ virtual ~DNSObserver() {}
private:
DISALLOW_COPY_AND_ASSIGN(DNSObserver);
diff --git a/net/base/stream_listen_socket.h b/net/base/stream_listen_socket.h
index 146e1d1..95c3260 100644
--- a/net/base/stream_listen_socket.h
+++ b/net/base/stream_listen_socket.h
@@ -60,8 +60,6 @@ class NET_EXPORT StreamListenSocket
// should be split up similarly.
class Delegate {
public:
- virtual ~Delegate() {}
-
// |server| is the original listening Socket, connection is the new
// Socket that was created. Ownership of |connection| is transferred
// to the delegate with this call.
@@ -71,6 +69,9 @@ class NET_EXPORT StreamListenSocket
const char* data,
int len) = 0;
virtual void DidClose(StreamListenSocket* sock) = 0;
+
+ protected:
+ virtual ~Delegate() {}
};
// Send data to the socket.
diff --git a/net/curvecp/packetizer.h b/net/curvecp/packetizer.h
index bd4c27f..c4b62ed 100644
--- a/net/curvecp/packetizer.h
+++ b/net/curvecp/packetizer.h
@@ -27,8 +27,6 @@ class Packetizer {
size_t length) = 0;
};
- virtual ~Packetizer() {}
-
// Send a message on a connection.
virtual int SendMessage(ConnectionKey key,
const char* data,
@@ -43,6 +41,9 @@ class Packetizer {
// Returns the current maximum message size which can be fit into the next
// message payload to be sent on the packetizer.
virtual int max_message_payload() const = 0;
+
+ protected:
+ virtual ~Packetizer() {}
};
} // namespace net
diff --git a/net/disk_cache/file.h b/net/disk_cache/file.h
index 3617e0c..446ccf5 100644
--- a/net/disk_cache/file.h
+++ b/net/disk_cache/file.h
@@ -19,11 +19,12 @@ namespace disk_cache {
// This interface is used to support asynchronous ReadData and WriteData calls.
class FileIOCallback {
public:
- virtual ~FileIOCallback() {}
-
// Notified of the actual number of bytes read or written. This value is
// negative if an error occurred.
virtual void OnFileIOComplete(int bytes_copied) = 0;
+
+ protected:
+ virtual ~FileIOCallback() {}
};
// Simple wrapper around a file that allows asynchronous operations.
diff --git a/net/socket_stream/socket_stream.h b/net/socket_stream/socket_stream.h
index a2e5ddb..f756969 100644
--- a/net/socket_stream/socket_stream.h
+++ b/net/socket_stream/socket_stream.h
@@ -59,8 +59,6 @@ class NET_EXPORT SocketStream
class NET_EXPORT Delegate {
public:
- virtual ~Delegate() {}
-
virtual int OnStartOpenConnection(SocketStream* socket,
const CompletionCallback& callback) {
return OK;
@@ -121,6 +119,9 @@ class NET_EXPORT SocketStream
CookieOptions* options) {
return true;
}
+
+ protected:
+ virtual ~Delegate() {}
};
SocketStream(const GURL& url, Delegate* delegate);
diff --git a/net/spdy/buffered_spdy_framer.h b/net/spdy/buffered_spdy_framer.h
index f2eb6f0..494238e 100644
--- a/net/spdy/buffered_spdy_framer.h
+++ b/net/spdy/buffered_spdy_framer.h
@@ -21,7 +21,6 @@ namespace net {
class NET_EXPORT_PRIVATE BufferedSpdyFramerVisitorInterface {
public:
BufferedSpdyFramerVisitorInterface() {}
- virtual ~BufferedSpdyFramerVisitorInterface() {}
// Called if an error is detected in the SpdyFrame protocol.
virtual void OnError(SpdyFramer::SpdyError error_code) = 0;
@@ -69,6 +68,9 @@ class NET_EXPORT_PRIVATE BufferedSpdyFramerVisitorInterface {
// and validated.
virtual void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) = 0;
+ protected:
+ virtual ~BufferedSpdyFramerVisitorInterface() {}
+
private:
DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramerVisitorInterface);
};
diff --git a/net/spdy/spdy_websocket_stream.h b/net/spdy/spdy_websocket_stream.h
index 9971ec6..d8d85da 100644
--- a/net/spdy/spdy_websocket_stream.h
+++ b/net/spdy/spdy_websocket_stream.h
@@ -51,6 +51,9 @@ class NET_EXPORT_PRIVATE SpdyWebSocketStream
// Called when SpdyStream is closed.
virtual void OnCloseSpdyStream() = 0;
+
+ protected:
+ virtual ~Delegate() {}
};
SpdyWebSocketStream(SpdySession* spdy_session, Delegate* delegate);
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 1bae37d..7ceae54 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -233,8 +233,6 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
//
class NET_EXPORT Delegate {
public:
- virtual ~Delegate() {}
-
// Called upon a server-initiated redirect. The delegate may call the
// request's Cancel method to prevent the redirect from being followed.
// Since there may be multiple chained redirects, there may also be more
@@ -302,6 +300,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// If an error occurred, request->status() will contain the error,
// and bytes read will be -1.
virtual void OnReadCompleted(URLRequest* request, int bytes_read) = 0;
+
+ protected:
+ virtual ~Delegate() {}
};
// Initialize an URL request.