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

Unified Diff: net/http/http_pipelined_connection_impl_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
Index: net/http/http_pipelined_connection_impl_unittest.cc
diff --git a/net/http/http_pipelined_connection_impl_unittest.cc b/net/http/http_pipelined_connection_impl_unittest.cc
index cc4648bd75d4c2f730ea4da545a730d3ead481d0..3b114e7218a875bc2b9b84ef7454bd3fbfaf3297 100644
--- a/net/http/http_pipelined_connection_impl_unittest.cc
+++ b/net/http/http_pipelined_connection_impl_unittest.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
@@ -80,8 +81,8 @@ class HttpPipelinedConnectionImplTest : public testing::Test {
void 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(MockConnect(SYNCHRONOUS, OK));
if (reads_count || writes_count) {
data_->StopAfter(reads_count + writes_count);
@@ -148,7 +149,7 @@ class HttpPipelinedConnectionImplTest : public testing::Test {
DeterministicMockClientSocketFactory factory_;
ClientSocketPoolHistograms histograms_;
MockTransportClientSocketPool pool_;
- scoped_refptr<DeterministicSocketData> data_;
+ scoped_ptr<DeterministicSocketData> data_;
HostPortPair origin_;
SSLConfig ssl_config_;
« no previous file with comments | « net/http/http_network_transaction_spdy3_unittest.cc ('k') | net/http/http_pipelined_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698