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

Unified Diff: net/spdy/spdy_test_utils.cc

Issue 485833002: HTTP2 draft 14 support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ignore_result(). Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_test_util_common.cc ('k') | net/tools/flip_server/spdy_interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_utils.cc
diff --git a/net/spdy/spdy_test_utils.cc b/net/spdy/spdy_test_utils.cc
index e33a08bc1c33f81d4bcdef41e91a16abedef0084..a065f6587c09519d0114ec0ac5ad7c267dec7f10 100644
--- a/net/spdy/spdy_test_utils.cc
+++ b/net/spdy/spdy_test_utils.cc
@@ -91,11 +91,9 @@ void SetFrameFlags(SpdyFrame* frame,
switch (spdy_version) {
case SPDY2:
case SPDY3:
- frame->data()[4] = flags;
- break;
case SPDY4:
case SPDY5:
- frame->data()[3] = flags;
+ frame->data()[4] = flags;
break;
default:
LOG(FATAL) << "Unsupported SPDY version.";
@@ -120,10 +118,10 @@ void SetFrameLength(SpdyFrame* frame,
case SPDY5:
CHECK_GT(1u<<14, length);
{
- int32 wire_length = base::HostToNet16(static_cast<uint16>(length));
+ int32 wire_length = base::HostToNet32(length);
memcpy(frame->data(),
- reinterpret_cast<char*>(&wire_length),
- sizeof(uint16));
+ reinterpret_cast<char*>(&wire_length) + 1,
+ 3);
}
break;
default:
« no previous file with comments | « net/spdy/spdy_test_util_common.cc ('k') | net/tools/flip_server/spdy_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698