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

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

Issue 2994003: Refactor how ClientSocketPoolBaseHelper avoids re-entrancy. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Merge. Created 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/http/http_proxy_client_socket_pool.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 virtual int RequestSocket(const std::string& group_name, 260 virtual int RequestSocket(const std::string& group_name,
261 const void* socket_params, 261 const void* socket_params,
262 RequestPriority priority, 262 RequestPriority priority,
263 ClientSocketHandle* handle, 263 ClientSocketHandle* handle,
264 CompletionCallback* callback, 264 CompletionCallback* callback,
265 const BoundNetLog& net_log) { 265 const BoundNetLog& net_log) {
266 last_group_name_ = group_name; 266 last_group_name_ = group_name;
267 return ERR_IO_PENDING; 267 return ERR_IO_PENDING;
268 } 268 }
269 virtual void CancelRequest(const std::string& group_name, 269 virtual void CancelRequest(const std::string& group_name,
270 const ClientSocketHandle* handle) { } 270 ClientSocketHandle* handle) {}
271 virtual void ReleaseSocket(const std::string& group_name, 271 virtual void ReleaseSocket(const std::string& group_name,
272 ClientSocket* socket) {} 272 ClientSocket* socket) {}
273 virtual void CloseIdleSockets() {} 273 virtual void CloseIdleSockets() {}
274 virtual HostResolver* GetHostResolver() const { 274 virtual HostResolver* GetHostResolver() const {
275 return NULL; 275 return NULL;
276 } 276 }
277 virtual int IdleSocketCount() const { 277 virtual int IdleSocketCount() const {
278 return 0; 278 return 0;
279 } 279 }
280 virtual int IdleSocketCountInGroup(const std::string& group_name) const { 280 virtual int IdleSocketCountInGroup(const std::string& group_name) const {
(...skipping 5864 matching lines...) Expand 10 before | Expand all | Expand 10 after
6145 6145
6146 int rv = trans->Start(&request, &callback, BoundNetLog()); 6146 int rv = trans->Start(&request, &callback, BoundNetLog());
6147 EXPECT_EQ(ERR_IO_PENDING, rv); 6147 EXPECT_EQ(ERR_IO_PENDING, rv);
6148 EXPECT_EQ(ERR_CONNECTION_CLOSED, callback.WaitForResult()); 6148 EXPECT_EQ(ERR_CONNECTION_CLOSED, callback.WaitForResult());
6149 6149
6150 HttpNetworkTransaction::SetNextProtos(""); 6150 HttpNetworkTransaction::SetNextProtos("");
6151 HttpNetworkTransaction::SetUseAlternateProtocols(false); 6151 HttpNetworkTransaction::SetUseAlternateProtocols(false);
6152 } 6152 }
6153 6153
6154 } // namespace net 6154 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/http_proxy_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698