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

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

Issue 9760002: Revert 127717 - Revert 118788 - Revert 113405 - Revert 113305 - Revert 113300 - Revert 112134 - Rev… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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/http/http_proxy_client_socket_pool.cc ('k') | net/socket/client_socket_handle.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 (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 #ifndef NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ 5 #ifndef NET_SOCKET_CLIENT_SOCKET_HANDLE_H_
6 #define NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ 6 #define NET_SOCKET_CLIENT_SOCKET_HANDLE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // 85 //
86 // NOTE: To prevent the socket from being kept alive, be sure to call its 86 // NOTE: To prevent the socket from being kept alive, be sure to call its
87 // Disconnect method. This will result in the ClientSocketPool deleting the 87 // Disconnect method. This will result in the ClientSocketPool deleting the
88 // StreamSocket. 88 // StreamSocket.
89 void Reset(); 89 void Reset();
90 90
91 // Used after Init() is called, but before the ClientSocketPool has 91 // Used after Init() is called, but before the ClientSocketPool has
92 // initialized the ClientSocketHandle. 92 // initialized the ClientSocketHandle.
93 LoadState GetLoadState() const; 93 LoadState GetLoadState() const;
94 94
95 bool IsPoolStalled() const;
96
97 void AddLayeredPool(LayeredPool* layered_pool);
98
99 // Returns true when Init() has completed successfully. 95 // Returns true when Init() has completed successfully.
100 bool is_initialized() const { return is_initialized_; } 96 bool is_initialized() const { return is_initialized_; }
101 97
102 // Returns the time tick when Init() was called. 98 // Returns the time tick when Init() was called.
103 base::TimeTicks init_time() const { return init_time_; } 99 base::TimeTicks init_time() const { return init_time_; }
104 100
105 // Returns the time between Init() and when is_initialized() becomes true. 101 // Returns the time between Init() and when is_initialized() becomes true.
106 base::TimeDelta setup_time() const { return setup_time_; } 102 base::TimeDelta setup_time() const { return setup_time_; }
107 103
108 // Used by ClientSocketPool to initialize the ClientSocketHandle. 104 // Used by ClientSocketPool to initialize the ClientSocketHandle.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Resets the state of the ClientSocketHandle. |cancel| indicates whether or 157 // Resets the state of the ClientSocketHandle. |cancel| indicates whether or
162 // not to try to cancel the request with the ClientSocketPool. Does not 158 // not to try to cancel the request with the ClientSocketPool. Does not
163 // reset the supplemental error state. 159 // reset the supplemental error state.
164 void ResetInternal(bool cancel); 160 void ResetInternal(bool cancel);
165 161
166 // Resets the supplemental error state. 162 // Resets the supplemental error state.
167 void ResetErrorState(); 163 void ResetErrorState();
168 164
169 bool is_initialized_; 165 bool is_initialized_;
170 ClientSocketPool* pool_; 166 ClientSocketPool* pool_;
171 LayeredPool* layered_pool_;
172 scoped_ptr<StreamSocket> socket_; 167 scoped_ptr<StreamSocket> socket_;
173 std::string group_name_; 168 std::string group_name_;
174 bool is_reused_; 169 bool is_reused_;
175 CompletionCallback callback_; 170 CompletionCallback callback_;
176 CompletionCallback user_callback_; 171 CompletionCallback user_callback_;
177 base::TimeDelta idle_time_; 172 base::TimeDelta idle_time_;
178 int pool_id_; // See ClientSocketPool::ReleaseSocket() for an explanation. 173 int pool_id_; // See ClientSocketPool::ReleaseSocket() for an explanation.
179 bool is_ssl_error_; 174 bool is_ssl_error_;
180 HttpResponseInfo ssl_error_response_info_; 175 HttpResponseInfo ssl_error_response_info_;
181 scoped_ptr<ClientSocketHandle> pending_http_proxy_connection_; 176 scoped_ptr<ClientSocketHandle> pending_http_proxy_connection_;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 user_callback_ = callback; 208 user_callback_ = callback;
214 } else { 209 } else {
215 HandleInitCompletion(rv); 210 HandleInitCompletion(rv);
216 } 211 }
217 return rv; 212 return rv;
218 } 213 }
219 214
220 } // namespace net 215 } // namespace net
221 216
222 #endif // NET_SOCKET_CLIENT_SOCKET_HANDLE_H_ 217 #endif // NET_SOCKET_CLIENT_SOCKET_HANDLE_H_
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket_pool.cc ('k') | net/socket/client_socket_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698