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 // This file declares HttpCache::Transaction, a private class of HttpCache so | 5 // This file declares HttpCache::Transaction, a private class of HttpCache so |
6 // it should only be included by http_cache.cc | 6 // it should only be included by http_cache.cc |
7 | 7 |
8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
15 #include "net/base/request_priority.h" | 15 #include "net/base/request_priority.h" |
16 #include "net/http/http_cache.h" | 16 #include "net/http/http_cache.h" |
17 #include "net/http/http_request_headers.h" | 17 #include "net/http/http_request_headers.h" |
18 #include "net/http/http_response_headers.h" | 18 #include "net/http/http_response_headers.h" |
19 #include "net/http/http_response_info.h" | 19 #include "net/http/http_response_info.h" |
20 #include "net/http/http_transaction.h" | 20 #include "net/http/http_transaction.h" |
21 #include "net/log/net_log.h" | 21 #include "net/log/net_log.h" |
| 22 #include "net/socket/connection_attempts.h" |
22 | 23 |
23 namespace net { | 24 namespace net { |
24 | 25 |
25 class PartialData; | 26 class PartialData; |
26 struct HttpRequestInfo; | 27 struct HttpRequestInfo; |
27 struct LoadTimingInfo; | 28 struct LoadTimingInfo; |
28 | 29 |
29 // This is the transaction that is returned by the HttpCache transaction | 30 // This is the transaction that is returned by the HttpCache transaction |
30 // factory. | 31 // factory. |
31 class HttpCache::Transaction : public HttpTransaction { | 32 class HttpCache::Transaction : public HttpTransaction { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 void SetQuicServerInfo(QuicServerInfo* quic_server_info) override; | 138 void SetQuicServerInfo(QuicServerInfo* quic_server_info) override; |
138 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; | 139 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; |
139 void SetPriority(RequestPriority priority) override; | 140 void SetPriority(RequestPriority priority) override; |
140 void SetWebSocketHandshakeStreamCreateHelper( | 141 void SetWebSocketHandshakeStreamCreateHelper( |
141 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; | 142 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; |
142 void SetBeforeNetworkStartCallback( | 143 void SetBeforeNetworkStartCallback( |
143 const BeforeNetworkStartCallback& callback) override; | 144 const BeforeNetworkStartCallback& callback) override; |
144 void SetBeforeProxyHeadersSentCallback( | 145 void SetBeforeProxyHeadersSentCallback( |
145 const BeforeProxyHeadersSentCallback& callback) override; | 146 const BeforeProxyHeadersSentCallback& callback) override; |
146 int ResumeNetworkStart() override; | 147 int ResumeNetworkStart() override; |
| 148 void GetConnectionAttempts(ConnectionAttempts* out) const override; |
147 | 149 |
148 private: | 150 private: |
149 static const size_t kNumValidationHeaders = 2; | 151 static const size_t kNumValidationHeaders = 2; |
150 // Helper struct to pair a header name with its value, for | 152 // Helper struct to pair a header name with its value, for |
151 // headers used to validate cache entries. | 153 // headers used to validate cache entries. |
152 struct ValidationHeaders { | 154 struct ValidationHeaders { |
153 ValidationHeaders() : initialized(false) {} | 155 ValidationHeaders() : initialized(false) {} |
154 | 156 |
155 std::string values[kNumValidationHeaders]; | 157 std::string values[kNumValidationHeaders]; |
156 bool initialized; | 158 bool initialized; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; | 483 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; |
482 | 484 |
483 base::WeakPtrFactory<Transaction> weak_factory_; | 485 base::WeakPtrFactory<Transaction> weak_factory_; |
484 | 486 |
485 DISALLOW_COPY_AND_ASSIGN(Transaction); | 487 DISALLOW_COPY_AND_ASSIGN(Transaction); |
486 }; | 488 }; |
487 | 489 |
488 } // namespace net | 490 } // namespace net |
489 | 491 |
490 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 492 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
OLD | NEW |