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

Side by Side Diff: net/quic/quic_end_to_end_unittest.cc

Issue 504953003: Remove implicit conversions from scoped_refptr to T* in net/quic/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_crypto_server_stream_test.cc ('k') | net/quic/quic_http_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 public: 47 public:
48 TestTransactionFactory(const HttpNetworkSession::Params& params) 48 TestTransactionFactory(const HttpNetworkSession::Params& params)
49 : session_(new HttpNetworkSession(params)) {} 49 : session_(new HttpNetworkSession(params)) {}
50 50
51 virtual ~TestTransactionFactory() { 51 virtual ~TestTransactionFactory() {
52 } 52 }
53 53
54 // HttpTransactionFactory methods 54 // HttpTransactionFactory methods
55 virtual int CreateTransaction(RequestPriority priority, 55 virtual int CreateTransaction(RequestPriority priority,
56 scoped_ptr<HttpTransaction>* trans) OVERRIDE { 56 scoped_ptr<HttpTransaction>* trans) OVERRIDE {
57 trans->reset(new HttpNetworkTransaction(priority, session_)); 57 trans->reset(new HttpNetworkTransaction(priority, session_.get()));
58 return OK; 58 return OK;
59 } 59 }
60 60
61 virtual HttpCache* GetCache() OVERRIDE { 61 virtual HttpCache* GetCache() OVERRIDE {
62 return NULL; 62 return NULL;
63 } 63 }
64 64
65 virtual HttpNetworkSession* GetSession() OVERRIDE { 65 virtual HttpNetworkSession* GetSession() OVERRIDE { return session_.get(); };
66 return session_;
67 };
68 66
69 private: 67 private:
70 scoped_refptr<HttpNetworkSession> session_; 68 scoped_refptr<HttpNetworkSession> session_;
71 }; 69 };
72 70
73 } // namespace 71 } // namespace
74 72
75 class QuicEndToEndTest : public PlatformTest { 73 class QuicEndToEndTest : public PlatformTest {
76 protected: 74 protected:
77 QuicEndToEndTest() 75 QuicEndToEndTest()
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 base::MessageLoop::current()->Run(); 304 base::MessageLoop::current()->Run();
307 305
308 for (size_t i = 0; i < num_requests; ++i) { 306 for (size_t i = 0; i < num_requests; ++i) {
309 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody); 307 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody);
310 } 308 }
311 STLDeleteElements(&consumers); 309 STLDeleteElements(&consumers);
312 } 310 }
313 311
314 } // namespace test 312 } // namespace test
315 } // namespace net 313 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_server_stream_test.cc ('k') | net/quic/quic_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698