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

Side by Side Diff: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h

Issue 2714573002: Enable websocket filtering via SubresourceFilter (Closed)
Patch Set: sync to #455176 Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 bool wasClean, 162 bool wasClean,
163 unsigned short code, 163 unsigned short code,
164 const String& reason) override; 164 const String& reason) override;
165 void didReceiveFlowControl(WebSocketHandle*, int64_t quota) override; 165 void didReceiveFlowControl(WebSocketHandle*, int64_t quota) override;
166 void didStartClosingHandshake(WebSocketHandle*) override; 166 void didStartClosingHandshake(WebSocketHandle*) override;
167 167
168 // Methods for BlobLoader. 168 // Methods for BlobLoader.
169 void didFinishLoadingBlob(DOMArrayBuffer*); 169 void didFinishLoadingBlob(DOMArrayBuffer*);
170 void didFailLoadingBlob(FileError::ErrorCode); 170 void didFailLoadingBlob(FileError::ErrorCode);
171 171
172 void tearDownFailedConnection();
173 bool shouldDisallowConnection(const KURL&);
174
172 // m_handle is a handle of the connection. 175 // m_handle is a handle of the connection.
173 // m_handle == 0 means this channel is closed. 176 // m_handle == 0 means this channel is closed.
174 std::unique_ptr<WebSocketHandle> m_handle; 177 std::unique_ptr<WebSocketHandle> m_handle;
175 178
176 // m_client can be deleted while this channel is alive, but this class 179 // m_client can be deleted while this channel is alive, but this class
177 // expects that disconnect() is called before the deletion. 180 // expects that disconnect() is called before the deletion.
178 Member<WebSocketChannelClient> m_client; 181 Member<WebSocketChannelClient> m_client;
179 KURL m_url; 182 KURL m_url;
180 // m_identifier > 0 means calling scriptContextExecution() returns a Document. 183 // m_identifier > 0 means calling scriptContextExecution() returns a Document.
181 unsigned long m_identifier; 184 unsigned long m_identifier;
(...skipping 13 matching lines...) Expand all
195 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; 198 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest;
196 199
197 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; 200 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15;
198 }; 201 };
199 202
200 std::ostream& operator<<(std::ostream&, const DocumentWebSocketChannel*); 203 std::ostream& operator<<(std::ostream&, const DocumentWebSocketChannel*);
201 204
202 } // namespace blink 205 } // namespace blink
203 206
204 #endif // DocumentWebSocketChannel_h 207 #endif // DocumentWebSocketChannel_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698