OLD | NEW |
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 #include "net/tools/flip_server/spdy_interface.h" | 5 #include "net/tools/flip_server/spdy_interface.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "net/spdy/spdy_framer.h" | 10 #include "net/spdy/spdy_framer.h" |
11 #include "net/spdy/spdy_protocol.h" | 11 #include "net/spdy/spdy_protocol.h" |
12 #include "net/tools/dump_cache/url_utilities.h" | 12 #include "net/tools/dump_cache/url_utilities.h" |
13 #include "net/tools/flip_server/flip_config.h" | 13 #include "net/tools/flip_server/flip_config.h" |
14 #include "net/tools/flip_server/http_interface.h" | 14 #include "net/tools/flip_server/http_interface.h" |
15 #include "net/tools/flip_server/spdy_util.h" | 15 #include "net/tools/flip_server/spdy_util.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 | 18 |
19 // static | 19 // static |
20 std::string SpdySM::forward_ip_header_; | 20 std::string SpdySM::forward_ip_header_; |
21 | 21 |
22 class SpdyFrameDataFrame : public DataFrame { | 22 class SpdyFrameDataFrame : public DataFrame { |
23 public: | 23 public: |
24 SpdyFrameDataFrame(SpdyFrame* spdy_frame) | 24 explicit SpdyFrameDataFrame(SpdyFrame* spdy_frame) |
25 : frame(spdy_frame) { | 25 : frame(spdy_frame) { |
26 data = spdy_frame->data(); | 26 data = spdy_frame->data(); |
27 size = spdy_frame->length() + SpdyFrame::kHeaderSize; | 27 size = spdy_frame->length() + SpdyFrame::kHeaderSize; |
28 } | 28 } |
29 | 29 |
30 virtual ~SpdyFrameDataFrame() { | 30 virtual ~SpdyFrameDataFrame() { |
31 delete frame; | 31 delete frame; |
32 } | 32 } |
33 | 33 |
34 const SpdyFrame* frame; | 34 const SpdyFrame* frame; |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 mci->file_data->body.data() + mci->body_bytes_consumed, | 554 mci->file_data->body.data() + mci->body_bytes_consumed, |
555 num_to_write, 0, should_compress); | 555 num_to_write, 0, should_compress); |
556 VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: GetOutput SendDataFrame[" | 556 VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: GetOutput SendDataFrame[" |
557 << mci->stream_id << "]: " << num_to_write; | 557 << mci->stream_id << "]: " << num_to_write; |
558 mci->body_bytes_consumed += num_to_write; | 558 mci->body_bytes_consumed += num_to_write; |
559 mci->bytes_sent += num_to_write; | 559 mci->bytes_sent += num_to_write; |
560 } | 560 } |
561 } | 561 } |
562 | 562 |
563 } // namespace net | 563 } // namespace net |
OLD | NEW |