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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 #include "net/http/http_stream_base.h" | 47 #include "net/http/http_stream_base.h" |
48 #include "net/http/http_stream_factory.h" | 48 #include "net/http/http_stream_factory.h" |
49 #include "net/http/http_util.h" | 49 #include "net/http/http_util.h" |
50 #include "net/http/transport_security_state.h" | 50 #include "net/http/transport_security_state.h" |
51 #include "net/http/url_security_manager.h" | 51 #include "net/http/url_security_manager.h" |
52 #include "net/socket/client_socket_factory.h" | 52 #include "net/socket/client_socket_factory.h" |
53 #include "net/socket/socks_client_socket_pool.h" | 53 #include "net/socket/socks_client_socket_pool.h" |
54 #include "net/socket/ssl_client_socket.h" | 54 #include "net/socket/ssl_client_socket.h" |
55 #include "net/socket/ssl_client_socket_pool.h" | 55 #include "net/socket/ssl_client_socket_pool.h" |
56 #include "net/socket/transport_client_socket_pool.h" | 56 #include "net/socket/transport_client_socket_pool.h" |
| 57 #include "net/spdy/hpack_huffman_aggregator.h" |
57 #include "net/spdy/spdy_http_stream.h" | 58 #include "net/spdy/spdy_http_stream.h" |
58 #include "net/spdy/spdy_session.h" | 59 #include "net/spdy/spdy_session.h" |
59 #include "net/spdy/spdy_session_pool.h" | 60 #include "net/spdy/spdy_session_pool.h" |
60 #include "net/ssl/ssl_cert_request_info.h" | 61 #include "net/ssl/ssl_cert_request_info.h" |
61 #include "net/ssl/ssl_connection_status_flags.h" | 62 #include "net/ssl/ssl_connection_status_flags.h" |
62 #include "url/gurl.h" | 63 #include "url/gurl.h" |
63 | 64 |
64 #if defined(SPDY_PROXY_AUTH_ORIGIN) | 65 #if defined(SPDY_PROXY_AUTH_ORIGIN) |
65 #include <algorithm> | 66 #include <algorithm> |
66 #include "net/proxy/proxy_server.h" | 67 #include "net/proxy/proxy_server.h" |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 endpoint); | 1094 endpoint); |
1094 | 1095 |
1095 int rv = HandleAuthChallenge(); | 1096 int rv = HandleAuthChallenge(); |
1096 if (rv != OK) | 1097 if (rv != OK) |
1097 return rv; | 1098 return rv; |
1098 | 1099 |
1099 if (is_https_request()) | 1100 if (is_https_request()) |
1100 stream_->GetSSLInfo(&response_.ssl_info); | 1101 stream_->GetSSLInfo(&response_.ssl_info); |
1101 | 1102 |
1102 headers_valid_ = true; | 1103 headers_valid_ = true; |
| 1104 |
| 1105 if (session_->huffman_aggregator()) { |
| 1106 session_->huffman_aggregator()->AggregateTransactionCharacterCounts( |
| 1107 *request_, |
| 1108 request_headers_, |
| 1109 proxy_info_.proxy_server(), |
| 1110 *response_.headers); |
| 1111 } |
1103 return OK; | 1112 return OK; |
1104 } | 1113 } |
1105 | 1114 |
1106 int HttpNetworkTransaction::DoReadBody() { | 1115 int HttpNetworkTransaction::DoReadBody() { |
1107 DCHECK(read_buf_.get()); | 1116 DCHECK(read_buf_.get()); |
1108 DCHECK_GT(read_buf_len_, 0); | 1117 DCHECK_GT(read_buf_len_, 0); |
1109 DCHECK(stream_ != NULL); | 1118 DCHECK(stream_ != NULL); |
1110 | 1119 |
1111 next_state_ = STATE_READ_BODY_COMPLETE; | 1120 next_state_ = STATE_READ_BODY_COMPLETE; |
1112 return stream_->ReadResponseBody( | 1121 return stream_->ReadResponseBody( |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1603 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1612 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
1604 state); | 1613 state); |
1605 break; | 1614 break; |
1606 } | 1615 } |
1607 return description; | 1616 return description; |
1608 } | 1617 } |
1609 | 1618 |
1610 #undef STATE_CASE | 1619 #undef STATE_CASE |
1611 | 1620 |
1612 } // namespace net | 1621 } // namespace net |
OLD | NEW |