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

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

Issue 612323013: QUIC - (no behavior change) s/NULL/nullptr/g in .../quic/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_dispatcher.cc ('k') | net/quic/quic_framer.h » ('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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_.get())); 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 nullptr;
63 } 63 }
64 64
65 virtual HttpNetworkSession* GetSession() OVERRIDE { return session_.get(); }; 65 virtual HttpNetworkSession* GetSession() OVERRIDE { return session_.get(); };
66 66
67 private: 67 private:
68 scoped_refptr<HttpNetworkSession> session_; 68 scoped_refptr<HttpNetworkSession> session_;
69 }; 69 };
70 70
71 } // namespace 71 } // namespace
72 72
73 class QuicEndToEndTest : public PlatformTest { 73 class QuicEndToEndTest : public PlatformTest {
74 protected: 74 protected:
75 QuicEndToEndTest() 75 QuicEndToEndTest()
76 : host_resolver_impl_(CreateResolverImpl()), 76 : host_resolver_impl_(CreateResolverImpl()),
77 host_resolver_(host_resolver_impl_.PassAs<HostResolver>()), 77 host_resolver_(host_resolver_impl_.PassAs<HostResolver>()),
78 ssl_config_service_(new SSLConfigServiceDefaults), 78 ssl_config_service_(new SSLConfigServiceDefaults),
79 proxy_service_(ProxyService::CreateDirect()), 79 proxy_service_(ProxyService::CreateDirect()),
80 auth_handler_factory_( 80 auth_handler_factory_(
81 HttpAuthHandlerFactory::CreateDefault(&host_resolver_)), 81 HttpAuthHandlerFactory::CreateDefault(&host_resolver_)),
82 strike_register_no_startup_period_(false) { 82 strike_register_no_startup_period_(false) {
83 request_.method = "GET"; 83 request_.method = "GET";
84 request_.url = GURL("http://www.google.com/"); 84 request_.url = GURL("http://www.google.com/");
85 request_.load_flags = 0; 85 request_.load_flags = 0;
86 86
87 params_.enable_quic = true; 87 params_.enable_quic = true;
88 params_.quic_clock = NULL; 88 params_.quic_clock = nullptr;
89 params_.quic_random = NULL; 89 params_.quic_random = nullptr;
90 params_.host_resolver = &host_resolver_; 90 params_.host_resolver = &host_resolver_;
91 params_.cert_verifier = &cert_verifier_; 91 params_.cert_verifier = &cert_verifier_;
92 params_.transport_security_state = &transport_security_state_; 92 params_.transport_security_state = &transport_security_state_;
93 params_.proxy_service = proxy_service_.get(); 93 params_.proxy_service = proxy_service_.get();
94 params_.ssl_config_service = ssl_config_service_.get(); 94 params_.ssl_config_service = ssl_config_service_.get();
95 params_.http_auth_handler_factory = auth_handler_factory_.get(); 95 params_.http_auth_handler_factory = auth_handler_factory_.get();
96 params_.http_server_properties = http_server_properties.GetWeakPtr(); 96 params_.http_server_properties = http_server_properties.GetWeakPtr();
97 } 97 }
98 98
99 // Creates a mock host resolver in which www.google.com 99 // Creates a mock host resolver in which www.google.com
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 base::MessageLoop::current()->Run(); 304 base::MessageLoop::current()->Run();
305 305
306 for (size_t i = 0; i < num_requests; ++i) { 306 for (size_t i = 0; i < num_requests; ++i) {
307 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody); 307 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody);
308 } 308 }
309 STLDeleteElements(&consumers); 309 STLDeleteElements(&consumers);
310 } 310 }
311 311
312 } // namespace test 312 } // namespace test
313 } // namespace net 313 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_dispatcher.cc ('k') | net/quic/quic_framer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698