OLD | NEW |
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_WEBSOCKETS_WEBSOCKET_JOB_H_ | 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_JOB_H_ |
6 #define NET_WEBSOCKETS_WEBSOCKET_JOB_H_ | 6 #define NET_WEBSOCKETS_WEBSOCKET_JOB_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // Saves received cookies to the cookie store, and then notifies the | 103 // Saves received cookies to the cookie store, and then notifies the |
104 // delegate_ of completion of handshake. | 104 // delegate_ of completion of handshake. |
105 void SaveCookiesAndNotifyHeadersComplete(); | 105 void SaveCookiesAndNotifyHeadersComplete(); |
106 void SaveNextCookie(); | 106 void SaveNextCookie(); |
107 void OnCookieSaved(bool cookie_status); | 107 void OnCookieSaved(bool cookie_status); |
108 // Clears variables for handling cookies, rebuilds handshake string excluding | 108 // Clears variables for handling cookies, rebuilds handshake string excluding |
109 // cookies, and then pass the handshake string to delegate_. | 109 // cookies, and then pass the handshake string to delegate_. |
110 void NotifyHeadersComplete(); | 110 void NotifyHeadersComplete(); |
111 void DoSendData(); | 111 void DoSendData(); |
112 | 112 |
| 113 GURL GetURLForCookies() const; |
| 114 |
113 const AddressList& address_list() const; | 115 const AddressList& address_list() const; |
114 int TrySpdyStream(); | 116 int TrySpdyStream(); |
115 void SetWaiting(); | 117 void SetWaiting(); |
116 bool IsWaiting() const; | 118 bool IsWaiting() const; |
117 void Wakeup(); | 119 void Wakeup(); |
118 void RetryPendingIO(); | 120 void RetryPendingIO(); |
119 void CompleteIO(int result); | 121 void CompleteIO(int result); |
120 | 122 |
121 bool SendDataInternal(const char* data, int length); | 123 bool SendDataInternal(const char* data, int length); |
122 void CloseInternal(); | 124 void CloseInternal(); |
(...skipping 29 matching lines...) Expand all Loading... |
152 | 154 |
153 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_; | 155 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_; |
154 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_for_send_pending_; | 156 base::WeakPtrFactory<WebSocketJob> weak_ptr_factory_for_send_pending_; |
155 | 157 |
156 DISALLOW_COPY_AND_ASSIGN(WebSocketJob); | 158 DISALLOW_COPY_AND_ASSIGN(WebSocketJob); |
157 }; | 159 }; |
158 | 160 |
159 } // namespace | 161 } // namespace |
160 | 162 |
161 #endif // NET_WEBSOCKETS_WEBSOCKET_JOB_H_ | 163 #endif // NET_WEBSOCKETS_WEBSOCKET_JOB_H_ |
OLD | NEW |