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

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: 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
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..e3fc6d47ae2e87eb77e1bfb2b08833deb9ab4582 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/scoped_ptr.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());

Powered by Google App Engine
This is Rietveld 408576698