Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 BufferedSpdyFramer framer((NetLogWithSource())); |
|
Bence
2017/05/10 12:43:29
Remove extra () here.
xunjieli
2017/05/10 18:24:59
Done.
| |
| 243 PriorityGetter priority_getter; | 243 PriorityGetter priority_getter; |
| 244 framer.set_visitor(&priority_getter); | 244 framer.set_visitor(&priority_getter); |
| 245 size_t frame_size = frame.size(); | 245 size_t frame_size = frame.size(); |
| 246 if (framer.ProcessInput(frame.data(), frame_size) != frame_size) { | 246 if (framer.ProcessInput(frame.data(), frame_size) != frame_size) { |
| 247 return false; | 247 return false; |
| 248 } | 248 } |
| 249 *priority = priority_getter.priority(); | 249 *priority = priority_getter.priority(); |
| 250 return true; | 250 return true; |
| 251 } | 251 } |
| 252 | 252 |
| (...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1158 headers[GetSchemeKey()] = scheme.c_str(); | 1158 headers[GetSchemeKey()] = scheme.c_str(); |
| 1159 headers[GetPathKey()] = path.c_str(); | 1159 headers[GetPathKey()] = path.c_str(); |
| 1160 if (content_length) { | 1160 if (content_length) { |
| 1161 SpdyString length_str = base::Int64ToString(*content_length); | 1161 SpdyString length_str = base::Int64ToString(*content_length); |
| 1162 headers["content-length"] = length_str; | 1162 headers["content-length"] = length_str; |
| 1163 } | 1163 } |
| 1164 return headers; | 1164 return headers; |
| 1165 } | 1165 } |
| 1166 | 1166 |
| 1167 } // namespace net | 1167 } // namespace net |
| OLD | NEW |