| 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_SPDY_BUFFERED_SPDY_FRAMER_H_ | 5 #ifndef NET_SPDY_BUFFERED_SPDY_FRAMER_H_ |
| 6 #define NET_SPDY_BUFFERED_SPDY_FRAMER_H_ | 6 #define NET_SPDY_BUFFERED_SPDY_FRAMER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 size_t GetFrameMaximumSize() const { | 228 size_t GetFrameMaximumSize() const { |
| 229 return spdy_framer_.GetFrameMaximumSize(); | 229 return spdy_framer_.GetFrameMaximumSize(); |
| 230 } | 230 } |
| 231 | 231 |
| 232 size_t GetDataFrameMaximumPayload() const { | 232 size_t GetDataFrameMaximumPayload() const { |
| 233 return spdy_framer_.GetDataFrameMaximumPayload(); | 233 return spdy_framer_.GetDataFrameMaximumPayload(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 int frames_received() const { return frames_received_; } | 236 int frames_received() const { return frames_received_; } |
| 237 | 237 |
| 238 // Returns the estimate of dynamically allocated memory in bytes. |
| 239 size_t EstimateMemoryUsage() const; |
| 240 |
| 238 private: | 241 private: |
| 239 void InitHeaderStreaming(SpdyStreamId stream_id); | 242 void InitHeaderStreaming(SpdyStreamId stream_id); |
| 240 | 243 |
| 241 SpdyFramer spdy_framer_; | 244 SpdyFramer spdy_framer_; |
| 242 BufferedSpdyFramerVisitorInterface* visitor_; | 245 BufferedSpdyFramerVisitorInterface* visitor_; |
| 243 | 246 |
| 244 // Header block streaming state: | 247 // Header block streaming state: |
| 245 std::string header_buffer_; | 248 std::string header_buffer_; |
| 246 bool header_buffer_valid_; | 249 bool header_buffer_valid_; |
| 247 SpdyStreamId header_stream_id_; | 250 SpdyStreamId header_stream_id_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 273 std::unique_ptr<GoAwayFields> goaway_fields_; | 276 std::unique_ptr<GoAwayFields> goaway_fields_; |
| 274 | 277 |
| 275 std::unique_ptr<HeaderCoalescer> coalescer_; | 278 std::unique_ptr<HeaderCoalescer> coalescer_; |
| 276 | 279 |
| 277 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); | 280 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); |
| 278 }; | 281 }; |
| 279 | 282 |
| 280 } // namespace net | 283 } // namespace net |
| 281 | 284 |
| 282 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ | 285 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ |
| OLD | NEW |