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

Side by Side Diff: net/spdy/chromium/buffered_spdy_framer.h

Issue 2847133003: Add NetLog event for invalid Http/2 response header (Closed)
Patch Set: address comments Created 3 years, 7 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
« no previous file with comments | « net/log/net_log_event_type_list.h ('k') | net/spdy/chromium/buffered_spdy_framer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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 explicit BufferedSpdyFramer(const NetLogWithSource& net_log);
125 BufferedSpdyFramer() = delete;
124 ~BufferedSpdyFramer() override; 126 ~BufferedSpdyFramer() override;
125 127
126 // Sets callbacks to be called from the buffered spdy framer. A visitor must 128 // 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 129 // 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 130 // visitor to do nothing. If this is called multiple times, only the last
129 // visitor will be used. 131 // visitor will be used.
130 void set_visitor(BufferedSpdyFramerVisitorInterface* visitor); 132 void set_visitor(BufferedSpdyFramerVisitorInterface* visitor);
131 133
132 // Set debug callbacks to be called from the framer. The debug visitor is 134 // 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. 135 // completely optional and need not be set in order for normal operation.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 SpdyErrorCode error_code; 265 SpdyErrorCode error_code;
264 SpdyString debug_data; 266 SpdyString debug_data;
265 267
266 // Returns the estimate of dynamically allocated memory in bytes. 268 // Returns the estimate of dynamically allocated memory in bytes.
267 size_t EstimateMemoryUsage() const; 269 size_t EstimateMemoryUsage() const;
268 }; 270 };
269 std::unique_ptr<GoAwayFields> goaway_fields_; 271 std::unique_ptr<GoAwayFields> goaway_fields_;
270 272
271 std::unique_ptr<HeaderCoalescer> coalescer_; 273 std::unique_ptr<HeaderCoalescer> coalescer_;
272 274
275 NetLogWithSource net_log_;
276
273 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); 277 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer);
274 }; 278 };
275 279
276 } // namespace net 280 } // namespace net
277 281
278 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ 282 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_
OLDNEW
« no previous file with comments | « net/log/net_log_event_type_list.h ('k') | net/spdy/chromium/buffered_spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698