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

Side by Side Diff: Source/modules/websockets/NewWebSocketChannelImpl.h

Issue 311993006: [WebSocket] bufferedAmount should not decrease inside a task. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 virtual ~NewWebSocketChannelImpl(); 77 virtual ~NewWebSocketChannelImpl();
78 78
79 // WebSocketChannel functions. 79 // WebSocketChannel functions.
80 virtual bool connect(const KURL&, const String& protocol) OVERRIDE; 80 virtual bool connect(const KURL&, const String& protocol) OVERRIDE;
81 virtual String subprotocol() OVERRIDE; 81 virtual String subprotocol() OVERRIDE;
82 virtual String extensions() OVERRIDE; 82 virtual String extensions() OVERRIDE;
83 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE; 83 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE;
84 virtual WebSocketChannel::SendResult send(const ArrayBuffer&, unsigned byteO ffset, unsigned byteLength) OVERRIDE; 84 virtual WebSocketChannel::SendResult send(const ArrayBuffer&, unsigned byteO ffset, unsigned byteLength) OVERRIDE;
85 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI DE; 85 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI DE;
86 virtual WebSocketChannel::SendResult send(PassOwnPtr<Vector<char> > data) OV ERRIDE; 86 virtual WebSocketChannel::SendResult send(PassOwnPtr<Vector<char> > data) OV ERRIDE;
87 virtual unsigned long bufferedAmount() const OVERRIDE;
88 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code 87 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code
89 // argument to omit payload. 88 // argument to omit payload.
90 virtual void close(int code, const String& reason) OVERRIDE; 89 virtual void close(int code, const String& reason) OVERRIDE;
91 virtual void fail(const String& reason, MessageLevel, const String&, unsigne d lineNumber) OVERRIDE; 90 virtual void fail(const String& reason, MessageLevel, const String&, unsigne d lineNumber) OVERRIDE;
92 virtual void disconnect() OVERRIDE; 91 virtual void disconnect() OVERRIDE;
93 92
94 virtual void suspend() OVERRIDE; 93 virtual void suspend() OVERRIDE;
95 virtual void resume() OVERRIDE; 94 virtual void resume() OVERRIDE;
96 95
97 virtual void trace(Visitor*) OVERRIDE; 96 virtual void trace(Visitor*) OVERRIDE;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 KURL m_url; 160 KURL m_url;
162 // m_identifier > 0 means calling scriptContextExecution() returns a Documen t. 161 // m_identifier > 0 means calling scriptContextExecution() returns a Documen t.
163 unsigned long m_identifier; 162 unsigned long m_identifier;
164 OwnPtrWillBeMember<BlobLoader> m_blobLoader; 163 OwnPtrWillBeMember<BlobLoader> m_blobLoader;
165 Deque<OwnPtr<Message> > m_messages; 164 Deque<OwnPtr<Message> > m_messages;
166 Vector<char> m_receivingMessageData; 165 Vector<char> m_receivingMessageData;
167 166
168 bool m_receivingMessageTypeIsText; 167 bool m_receivingMessageTypeIsText;
169 int64_t m_sendingQuota; 168 int64_t m_sendingQuota;
170 int64_t m_receivedDataSizeForFlowControl; 169 int64_t m_receivedDataSizeForFlowControl;
171 unsigned long m_bufferedAmount;
172 size_t m_sentSizeOfTopMessage; 170 size_t m_sentSizeOfTopMessage;
173 String m_subprotocol; 171 String m_subprotocol;
174 String m_extensions; 172 String m_extensions;
175 173
176 String m_sourceURLAtConstruction; 174 String m_sourceURLAtConstruction;
177 unsigned m_lineNumberAtConstruction; 175 unsigned m_lineNumberAtConstruction;
178 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; 176 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest;
179 177
180 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; 178 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15;
181 }; 179 };
182 180
183 } // namespace WebCore 181 } // namespace WebCore
184 182
185 #endif // NewWebSocketChannelImpl_h 183 #endif // NewWebSocketChannelImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698