| Index: net/quic/spdy_utils.cc
|
| diff --git a/net/quic/spdy_utils.cc b/net/quic/spdy_utils.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..de82c06e4b538d1e4b525fb025de4dd41f2bd7a3
|
| --- /dev/null
|
| +++ b/net/quic/spdy_utils.cc
|
| @@ -0,0 +1,25 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "net/quic/spdy_utils.h"
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "net/spdy/spdy_frame_builder.h"
|
| +#include "net/spdy/spdy_framer.h"
|
| +#include "net/spdy/spdy_protocol.h"
|
| +
|
| +using std::string;
|
| +
|
| +namespace net {
|
| +
|
| +// static
|
| +string SpdyUtils::SerializeUncompressedHeaders(const SpdyHeaderBlock& headers) {
|
| + int length = SpdyFramer::GetSerializedLength(kSpdyVersion3, &headers);
|
| + SpdyFrameBuilder builder(length);
|
| + SpdyFramer::WriteHeaderBlock(&builder, kSpdyVersion3, &headers);
|
| + scoped_ptr<SpdyFrame> block(builder.take());
|
| + return string(block->data(), length);
|
| +}
|
| +
|
| +} // namespace net
|
|
|