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

Side by Side Diff: net/http/http_proxy_client_socket_pool_spdy2_unittest.cc

Issue 16434016: Rewrite scoped_ptr<T>(NULL) to use the default ctor in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/http/http_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 std::string() /* ssl_session_cache_shard */, 82 std::string() /* ssl_session_cache_shard */,
83 session_deps_.deterministic_socket_factory.get(), 83 session_deps_.deterministic_socket_factory.get(),
84 &transport_socket_pool_, 84 &transport_socket_pool_,
85 NULL, 85 NULL,
86 NULL, 86 NULL,
87 session_deps_.ssl_config_service.get(), 87 session_deps_.ssl_config_service.get(),
88 BoundNetLog().net_log()), 88 BoundNetLog().net_log()),
89 session_(CreateNetworkSession()), 89 session_(CreateNetworkSession()),
90 http_proxy_histograms_("HttpProxyUnitTest"), 90 http_proxy_histograms_("HttpProxyUnitTest"),
91 spdy_util_(kProtoSPDY2), 91 spdy_util_(kProtoSPDY2),
92 ssl_data_(NULL),
93 data_(NULL),
94 pool_(kMaxSockets, 92 pool_(kMaxSockets,
95 kMaxSocketsPerGroup, 93 kMaxSocketsPerGroup,
96 &http_proxy_histograms_, 94 &http_proxy_histograms_,
97 NULL, 95 NULL,
98 &transport_socket_pool_, 96 &transport_socket_pool_,
99 &ssl_socket_pool_, 97 &ssl_socket_pool_,
100 NULL) { 98 NULL) {}
101 }
102 99
103 virtual ~HttpProxyClientSocketPoolSpdy2Test() { 100 virtual ~HttpProxyClientSocketPoolSpdy2Test() {
104 } 101 }
105 102
106 void AddAuthToCache() { 103 void AddAuthToCache() {
107 const base::string16 kFoo(ASCIIToUTF16("foo")); 104 const base::string16 kFoo(ASCIIToUTF16("foo"));
108 const base::string16 kBar(ASCIIToUTF16("bar")); 105 const base::string16 kBar(ASCIIToUTF16("bar"));
109 GURL proxy_url(GetParam() == HTTP ? "http://proxy" : "https://proxy:80"); 106 GURL proxy_url(GetParam() == HTTP ? "http://proxy" : "https://proxy:80");
110 session_->http_auth_cache()->Add(proxy_url, 107 session_->http_auth_cache()->Add(proxy_url,
111 "MyRealm1", 108 "MyRealm1",
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 // Make sure Location header was included and correct. 611 // Make sure Location header was included and correct.
615 std::string location; 612 std::string location;
616 EXPECT_TRUE(headers->IsRedirect(&location)); 613 EXPECT_TRUE(headers->IsRedirect(&location));
617 EXPECT_EQ(location, redirectTarget); 614 EXPECT_EQ(location, redirectTarget);
618 } 615 }
619 } 616 }
620 617
621 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. 618 // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
622 619
623 } // namespace net 620 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_cache_transaction.cc ('k') | net/http/http_proxy_client_socket_pool_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698