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

Side by Side Diff: net/spdy/chromium/spdy_test_util_common.cc

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/spdy/chromium/spdy_session_unittest.cc ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "net/spdy/chromium/spdy_test_util_common.h" 5 #include "net/spdy/chromium/spdy_test_util_common.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <utility> 10 #include <utility>
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 return false; 232 return false;
233 } 233 }
234 234
235 private: 235 private:
236 SpdyPriority priority_; 236 SpdyPriority priority_;
237 }; 237 };
238 238
239 } // namespace 239 } // namespace
240 240
241 bool GetSpdyPriority(const SpdySerializedFrame& frame, SpdyPriority* priority) { 241 bool GetSpdyPriority(const SpdySerializedFrame& frame, SpdyPriority* priority) {
242 BufferedSpdyFramer framer; 242 NetLogWithSource net_log;
243 BufferedSpdyFramer framer(net_log);
243 PriorityGetter priority_getter; 244 PriorityGetter priority_getter;
244 framer.set_visitor(&priority_getter); 245 framer.set_visitor(&priority_getter);
245 size_t frame_size = frame.size(); 246 size_t frame_size = frame.size();
246 if (framer.ProcessInput(frame.data(), frame_size) != frame_size) { 247 if (framer.ProcessInput(frame.data(), frame_size) != frame_size) {
247 return false; 248 return false;
248 } 249 }
249 *priority = priority_getter.priority(); 250 *priority = priority_getter.priority();
250 return true; 251 return true;
251 } 252 }
252 253
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 headers[GetSchemeKey()] = scheme.c_str(); 1159 headers[GetSchemeKey()] = scheme.c_str();
1159 headers[GetPathKey()] = path.c_str(); 1160 headers[GetPathKey()] = path.c_str();
1160 if (content_length) { 1161 if (content_length) {
1161 SpdyString length_str = base::Int64ToString(*content_length); 1162 SpdyString length_str = base::Int64ToString(*content_length);
1162 headers["content-length"] = length_str; 1163 headers["content-length"] = length_str;
1163 } 1164 }
1164 return headers; 1165 return headers;
1165 } 1166 }
1166 1167
1167 } // namespace net 1168 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/chromium/spdy_session_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698