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

Unified Diff: net/socket/buffered_write_stream_socket_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/http/http_stream_parser_unittest.cc ('k') | net/socket/deterministic_socket_data_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/buffered_write_stream_socket_unittest.cc
diff --git a/net/socket/buffered_write_stream_socket_unittest.cc b/net/socket/buffered_write_stream_socket_unittest.cc
index 9798a60c42c6bef26051e5223996badf82f7c34b..664422ef268b5c84c5d84f643021e8309a5313ad 100644
--- a/net/socket/buffered_write_stream_socket_unittest.cc
+++ b/net/socket/buffered_write_stream_socket_unittest.cc
@@ -6,6 +6,7 @@
#include "base/message_loop.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
#include "net/socket/socket_test_util.h"
@@ -24,7 +25,7 @@ class BufferedWriteStreamSocketTest : public testing::Test {
}
void Initialize(MockWrite* writes, size_t writes_count) {
- data_ = new DeterministicSocketData(NULL, 0, writes, writes_count);
+ data_.reset(new DeterministicSocketData(NULL, 0, writes, writes_count));
data_->set_connect_data(MockConnect(SYNCHRONOUS, 0));
if (writes_count) {
data_->StopAfter(writes_count);
@@ -43,7 +44,7 @@ class BufferedWriteStreamSocketTest : public testing::Test {
}
scoped_ptr<BufferedWriteStreamSocket> socket_;
- scoped_refptr<DeterministicSocketData> data_;
+ scoped_ptr<DeterministicSocketData> data_;
BoundNetLog net_log_;
TestCompletionCallback callback_;
};
« no previous file with comments | « net/http/http_stream_parser_unittest.cc ('k') | net/socket/deterministic_socket_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698