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

Side by Side Diff: net/socket/client_socket_pool.h

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 years, 9 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
« no previous file with comments | « net/socket/client_socket_handle.h ('k') | net/socket/client_socket_pool_base.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_H_ 5 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_H_
6 #define NET_SOCKET_CLIENT_SOCKET_POOL_H_ 6 #define NET_SOCKET_CLIENT_SOCKET_POOL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 29 matching lines...) Expand all
40 // ClientSocket was reused, then ClientSocketPool will call 40 // ClientSocket was reused, then ClientSocketPool will call
41 // |handle|->set_reused(true). In either case, the socket will have been 41 // |handle|->set_reused(true). In either case, the socket will have been
42 // allocated and will be connected. A client might want to know whether or 42 // allocated and will be connected. A client might want to know whether or
43 // not the socket is reused in order to know whether or not he needs to 43 // not the socket is reused in order to know whether or not he needs to
44 // perform SSL connection or tunnel setup or to request a new socket if he 44 // perform SSL connection or tunnel setup or to request a new socket if he
45 // encounters an error with the reused socket. 45 // encounters an error with the reused socket.
46 // 46 //
47 // If ERR_IO_PENDING is returned, then the callback will be used to notify the 47 // If ERR_IO_PENDING is returned, then the callback will be used to notify the
48 // client of completion. 48 // client of completion.
49 // 49 //
50 // Profiling information for the request is saved to |load_log| if non-NULL. 50 // Profiling information for the request is saved to |net_log| if non-NULL.
51 virtual int RequestSocket(const std::string& group_name, 51 virtual int RequestSocket(const std::string& group_name,
52 const void* params, 52 const void* params,
53 RequestPriority priority, 53 RequestPriority priority,
54 ClientSocketHandle* handle, 54 ClientSocketHandle* handle,
55 CompletionCallback* callback, 55 CompletionCallback* callback,
56 LoadLog* load_log) = 0; 56 const BoundNetLog& net_log) = 0;
57 57
58 // Called to cancel a RequestSocket call that returned ERR_IO_PENDING. The 58 // Called to cancel a RequestSocket call that returned ERR_IO_PENDING. The
59 // same handle parameter must be passed to this method as was passed to the 59 // same handle parameter must be passed to this method as was passed to the
60 // RequestSocket call being cancelled. The associated CompletionCallback is 60 // RequestSocket call being cancelled. The associated CompletionCallback is
61 // not run. 61 // not run.
62 virtual void CancelRequest(const std::string& group_name, 62 virtual void CancelRequest(const std::string& group_name,
63 const ClientSocketHandle* handle) = 0; 63 const ClientSocketHandle* handle) = 0;
64 64
65 // Called to release a socket once the socket is no longer needed. If the 65 // Called to release a socket once the socket is no longer needed. If the
66 // socket still has an established connection, then it will be added to the 66 // socket still has an established connection, then it will be added to the
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // Provides an empty definition for CheckIsValidSocketParamsForPool() which 108 // Provides an empty definition for CheckIsValidSocketParamsForPool() which
109 // should be optimized out by the compiler. 109 // should be optimized out by the compiler.
110 #define REGISTER_SOCKET_PARAMS_FOR_POOL(pool_type, socket_params) \ 110 #define REGISTER_SOCKET_PARAMS_FOR_POOL(pool_type, socket_params) \
111 template<> \ 111 template<> \
112 inline void CheckIsValidSocketParamsForPool<pool_type, socket_params>() {} 112 inline void CheckIsValidSocketParamsForPool<pool_type, socket_params>() {}
113 113
114 } // namespace net 114 } // namespace net
115 115
116 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_H_ 116 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_H_
OLDNEW
« no previous file with comments | « net/socket/client_socket_handle.h ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698