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

Unified Diff: net/socket/deterministic_socket_data_unittest.cc

Issue 10690104: DeterministicSocketDataProvider should not be RefCounted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more leak fix Created 8 years, 5 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/buffered_write_stream_socket_unittest.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/deterministic_socket_data_unittest.cc
diff --git a/net/socket/deterministic_socket_data_unittest.cc b/net/socket/deterministic_socket_data_unittest.cc
index 99703beb816b5a4fa040c950b91c7337e36a3e59..e3fa4afbbc5c72527035f2f122de135bf6068246 100644
--- a/net/socket/deterministic_socket_data_unittest.cc
+++ b/net/socket/deterministic_socket_data_unittest.cc
@@ -4,6 +4,9 @@
#include "net/socket/socket_test_util.h"
+#include <string.h>
+
+#include "base/memory/ref_counted.h"
#include "testing/platform_test.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -44,7 +47,7 @@ class DeterministicSocketDataTest : public PlatformTest {
TestCompletionCallback read_callback_;
TestCompletionCallback write_callback_;
StreamSocket* sock_;
- scoped_refptr<DeterministicSocketData> data_;
+ scoped_ptr<DeterministicSocketData> data_;
private:
scoped_refptr<IOBuffer> read_buf_;
@@ -85,7 +88,8 @@ void DeterministicSocketDataTest::Initialize(MockRead* reads,
size_t reads_count,
MockWrite* writes,
size_t writes_count) {
- data_ = new DeterministicSocketData(reads, reads_count, writes, writes_count);
+ data_.reset(new DeterministicSocketData(reads, reads_count,
+ writes, writes_count));
data_->set_connect_data(connect_data_);
socket_factory_.AddSocketDataProvider(data_.get());
« no previous file with comments | « net/socket/buffered_write_stream_socket_unittest.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698