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

Unified Diff: net/socket/socket_test_util.h

Issue 10066045: RefCounted types should not have public destructors, net/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Deprecated cookiestore fix Created 8 years, 8 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
« no previous file with comments | « net/socket/nss_ssl_util.cc ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_test_util.h
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index 350e0b4439e2dc2c6c4e7d2689d6de2434b0db40..d54e2ac5ac141230c75bee9a4f102c7d4b8835c1 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -433,14 +433,14 @@ class DeterministicMockTCPClientSocket;
//
// For examples of how to use this class, see:
// deterministic_socket_data_unittests.cc
-class DeterministicSocketData : public StaticSocketDataProvider,
- public base::RefCounted<DeterministicSocketData> {
+class DeterministicSocketData
+ : public StaticSocketDataProvider,
+ public base::RefCounted<DeterministicSocketData> {
public:
// |reads| the list of MockRead completions.
// |writes| the list of MockWrite completions.
DeterministicSocketData(MockRead* reads, size_t reads_count,
MockWrite* writes, size_t writes_count);
- virtual ~DeterministicSocketData();
// Consume all the data up to the give stop point (via SetStop()).
void Run();
@@ -475,7 +475,12 @@ class DeterministicSocketData : public StaticSocketDataProvider,
virtual void Reset() OVERRIDE;
virtual void CompleteRead() OVERRIDE {}
+ protected:
+ virtual ~DeterministicSocketData();
+
private:
+ friend class base::RefCounted<DeterministicSocketData>;
+
// Invoke the read and write callbacks, if the timing is appropriate.
void InvokeCallbacks();
@@ -496,8 +501,7 @@ class DeterministicSocketData : public StaticSocketDataProvider,
template<typename T>
class SocketDataProviderArray {
public:
- SocketDataProviderArray() : next_index_(0) {
- }
+ SocketDataProviderArray() : next_index_(0) {}
T* GetNext() {
DCHECK_LT(next_index_, data_providers_.size());
« no previous file with comments | « net/socket/nss_ssl_util.cc ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698