| 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 #ifndef NET_TOOLS_QUIC_SPDY_BALSA_UTILS_H_ | 5 #include "net/base/network_interfaces.h" |
| 6 #define NET_TOOLS_QUIC_SPDY_BALSA_UTILS_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "net/quic/quic_protocol.h" | |
| 11 #include "net/spdy/spdy_framer.h" | |
| 12 #include "net/spdy/spdy_header_block.h" | |
| 13 #include "net/spdy/spdy_protocol.h" | |
| 14 #include "net/tools/balsa/balsa_headers.h" | |
| 15 | 6 |
| 16 namespace net { | 7 namespace net { |
| 17 namespace tools { | |
| 18 | 8 |
| 19 class SpdyBalsaUtils { | 9 NetworkInterface::NetworkInterface() |
| 20 public: | 10 : type(NetworkChangeNotifier::CONNECTION_UNKNOWN), prefix_length(0) { |
| 21 static std::string SerializeResponseHeaders( | 11 } |
| 22 const BalsaHeaders& response_headers, | |
| 23 QuicVersion quic_version); | |
| 24 | 12 |
| 25 static SpdyHeaderBlock RequestHeadersToSpdyHeaders( | 13 NetworkInterface::NetworkInterface(const std::string& name, |
| 26 const BalsaHeaders& request_headers, | 14 const std::string& friendly_name, |
| 27 QuicVersion quic_version); | 15 uint32 interface_index, |
| 16 NetworkChangeNotifier::ConnectionType type, |
| 17 const IPAddressNumber& address, |
| 18 uint32 prefix_length, |
| 19 int ip_address_attributes) |
| 20 : name(name), |
| 21 friendly_name(friendly_name), |
| 22 interface_index(interface_index), |
| 23 type(type), |
| 24 address(address), |
| 25 prefix_length(prefix_length), |
| 26 ip_address_attributes(ip_address_attributes) { |
| 27 } |
| 28 | 28 |
| 29 static SpdyHeaderBlock ResponseHeadersToSpdyHeaders( | 29 NetworkInterface::~NetworkInterface() { |
| 30 const BalsaHeaders& response_headers, | 30 } |
| 31 QuicVersion quic_version); | |
| 32 | 31 |
| 33 static void SpdyHeadersToResponseHeaders(const SpdyHeaderBlock& block, | 32 ScopedWifiOptions::~ScopedWifiOptions() { |
| 34 BalsaHeaders* headers, | 33 } |
| 35 QuicVersion quic_version); | |
| 36 | 34 |
| 37 private: | |
| 38 DISALLOW_COPY_AND_ASSIGN(SpdyBalsaUtils); | |
| 39 }; | |
| 40 | |
| 41 } // namespace tools | |
| 42 } // namespace net | 35 } // namespace net |
| 43 | |
| 44 #endif // NET_TOOLS_QUIC_SPDY_BALSA_UTILS_H_ | |
| OLD | NEW |