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

Side by Side Diff: net/websockets/websocket_stream.h

Issue 170843007: Introduce url::Origin to represent Web Origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
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_WEBSOCKETS_WEBSOCKET_STREAM_H_ 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_STREAM_H_
6 #define NET_WEBSOCKETS_WEBSOCKET_STREAM_H_ 6 #define NET_WEBSOCKETS_WEBSOCKET_STREAM_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // is called with a WebSocket result code corresponding to the error. Deleting 80 // is called with a WebSocket result code corresponding to the error. Deleting
81 // the returned WebSocketStreamRequest object will cancel the connection, in 81 // the returned WebSocketStreamRequest object will cancel the connection, in
82 // which case the |connect_delegate| object that the caller passed will be 82 // which case the |connect_delegate| object that the caller passed will be
83 // deleted without any of its methods being called. Unless cancellation is 83 // deleted without any of its methods being called. Unless cancellation is
84 // required, the caller should keep the WebSocketStreamRequest object alive 84 // required, the caller should keep the WebSocketStreamRequest object alive
85 // until connect_delegate->OnSuccess() or OnFailure() have been called, then 85 // until connect_delegate->OnSuccess() or OnFailure() have been called, then
86 // it is safe to delete. 86 // it is safe to delete.
87 static scoped_ptr<WebSocketStreamRequest> CreateAndConnectStream( 87 static scoped_ptr<WebSocketStreamRequest> CreateAndConnectStream(
88 const GURL& socket_url, 88 const GURL& socket_url,
89 const std::vector<std::string>& requested_subprotocols, 89 const std::vector<std::string>& requested_subprotocols,
90 const GURL& origin, 90 const std::string& origin,
91 URLRequestContext* url_request_context, 91 URLRequestContext* url_request_context,
92 const BoundNetLog& net_log, 92 const BoundNetLog& net_log,
93 scoped_ptr<ConnectDelegate> connect_delegate); 93 scoped_ptr<ConnectDelegate> connect_delegate);
94 94
95 // Derived classes must make sure Close() is called when the stream is not 95 // Derived classes must make sure Close() is called when the stream is not
96 // closed on destruction. 96 // closed on destruction.
97 virtual ~WebSocketStream(); 97 virtual ~WebSocketStream();
98 98
99 // Reads WebSocket frame data. This operation finishes when new frame data 99 // Reads WebSocket frame data. This operation finishes when new frame data
100 // becomes available. 100 // becomes available.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 protected: 176 protected:
177 WebSocketStream(); 177 WebSocketStream();
178 178
179 private: 179 private:
180 DISALLOW_COPY_AND_ASSIGN(WebSocketStream); 180 DISALLOW_COPY_AND_ASSIGN(WebSocketStream);
181 }; 181 };
182 182
183 } // namespace net 183 } // namespace net
184 184
185 #endif // NET_WEBSOCKETS_WEBSOCKET_STREAM_H_ 185 #endif // NET_WEBSOCKETS_WEBSOCKET_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698