Chromium Code Reviews| 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 |
| 11 #include <memory> | 11 #include <memory> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "net/base/net_export.h" | 14 #include "net/base/net_export.h" |
| 15 #include "net/log/net_log_source.h" | |
| 15 #include "net/spdy/chromium/header_coalescer.h" | 16 #include "net/spdy/chromium/header_coalescer.h" |
| 16 #include "net/spdy/core/spdy_alt_svc_wire_format.h" | 17 #include "net/spdy/core/spdy_alt_svc_wire_format.h" |
| 17 #include "net/spdy/core/spdy_framer.h" | 18 #include "net/spdy/core/spdy_framer.h" |
| 18 #include "net/spdy/core/spdy_header_block.h" | 19 #include "net/spdy/core/spdy_header_block.h" |
| 19 #include "net/spdy/core/spdy_protocol.h" | 20 #include "net/spdy/core/spdy_protocol.h" |
| 20 #include "net/spdy/platform/api/spdy_string.h" | 21 #include "net/spdy/platform/api/spdy_string.h" |
| 21 #include "net/spdy/platform/api/spdy_string_piece.h" | 22 #include "net/spdy/platform/api/spdy_string_piece.h" |
| 22 | 23 |
| 23 namespace net { | 24 namespace net { |
| 24 | 25 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 protected: | 114 protected: |
| 114 virtual ~BufferedSpdyFramerVisitorInterface() {} | 115 virtual ~BufferedSpdyFramerVisitorInterface() {} |
| 115 | 116 |
| 116 private: | 117 private: |
| 117 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramerVisitorInterface); | 118 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramerVisitorInterface); |
| 118 }; | 119 }; |
| 119 | 120 |
| 120 class NET_EXPORT_PRIVATE BufferedSpdyFramer | 121 class NET_EXPORT_PRIVATE BufferedSpdyFramer |
| 121 : public SpdyFramerVisitorInterface { | 122 : public SpdyFramerVisitorInterface { |
| 122 public: | 123 public: |
| 123 BufferedSpdyFramer(); | 124 BufferedSpdyFramer(const NetLogWithSource& net_log); |
|
Bence
2017/04/28 18:08:35
explicit
xunjieli
2017/05/10 01:13:47
Done.
| |
| 124 ~BufferedSpdyFramer() override; | 125 ~BufferedSpdyFramer() override; |
| 125 | 126 |
| 126 // Sets callbacks to be called from the buffered spdy framer. A visitor must | 127 // Sets callbacks to be called from the buffered spdy framer. A visitor must |
| 127 // be set, or else the framer will likely crash. It is acceptable for the | 128 // be set, or else the framer will likely crash. It is acceptable for the |
| 128 // visitor to do nothing. If this is called multiple times, only the last | 129 // visitor to do nothing. If this is called multiple times, only the last |
| 129 // visitor will be used. | 130 // visitor will be used. |
| 130 void set_visitor(BufferedSpdyFramerVisitorInterface* visitor); | 131 void set_visitor(BufferedSpdyFramerVisitorInterface* visitor); |
| 131 | 132 |
| 132 // Set debug callbacks to be called from the framer. The debug visitor is | 133 // Set debug callbacks to be called from the framer. The debug visitor is |
| 133 // completely optional and need not be set in order for normal operation. | 134 // completely optional and need not be set in order for normal operation. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 263 SpdyErrorCode error_code; | 264 SpdyErrorCode error_code; |
| 264 SpdyString debug_data; | 265 SpdyString debug_data; |
| 265 | 266 |
| 266 // Returns the estimate of dynamically allocated memory in bytes. | 267 // Returns the estimate of dynamically allocated memory in bytes. |
| 267 size_t EstimateMemoryUsage() const; | 268 size_t EstimateMemoryUsage() const; |
| 268 }; | 269 }; |
| 269 std::unique_ptr<GoAwayFields> goaway_fields_; | 270 std::unique_ptr<GoAwayFields> goaway_fields_; |
| 270 | 271 |
| 271 std::unique_ptr<HeaderCoalescer> coalescer_; | 272 std::unique_ptr<HeaderCoalescer> coalescer_; |
| 272 | 273 |
| 274 NetLogWithSource net_log_; | |
| 275 | |
| 273 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); | 276 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); |
| 274 }; | 277 }; |
| 275 | 278 |
| 276 } // namespace net | 279 } // namespace net |
| 277 | 280 |
| 278 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ | 281 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ |
| OLD | NEW |