Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: net/http/http_transaction.h

Issue 135373002: Added SSLHostInfo. Storing of server host info to our standard disk cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with TOT Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_HTTP_HTTP_TRANSACTION_H_ 5 #ifndef NET_HTTP_HTTP_TRANSACTION_H_
6 #define NET_HTTP_HTTP_TRANSACTION_H_ 6 #define NET_HTTP_HTTP_TRANSACTION_H_
7 7
8 #include "net/base/completion_callback.h" 8 #include "net/base/completion_callback.h"
9 #include "net/base/load_states.h" 9 #include "net/base/load_states.h"
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
11 #include "net/base/request_priority.h" 11 #include "net/base/request_priority.h"
12 #include "net/base/upload_progress.h" 12 #include "net/base/upload_progress.h"
13 #include "net/websockets/websocket_handshake_stream_base.h" 13 #include "net/websockets/websocket_handshake_stream_base.h"
14 14
15 namespace net { 15 namespace net {
16 16
17 class AuthCredentials; 17 class AuthCredentials;
18 class BoundNetLog; 18 class BoundNetLog;
19 class HttpRequestHeaders; 19 class HttpRequestHeaders;
20 struct HttpRequestInfo; 20 struct HttpRequestInfo;
21 class HttpResponseInfo; 21 class HttpResponseInfo;
22 class IOBuffer; 22 class IOBuffer;
23 struct LoadTimingInfo; 23 struct LoadTimingInfo;
24 class X509Certificate; 24 class X509Certificate;
25 class SSLHostInfo;
25 26
26 // Represents a single HTTP transaction (i.e., a single request/response pair). 27 // Represents a single HTTP transaction (i.e., a single request/response pair).
27 // HTTP redirects are not followed and authentication challenges are not 28 // HTTP redirects are not followed and authentication challenges are not
28 // answered. Cookies are assumed to be managed by the caller. 29 // answered. Cookies are assumed to be managed by the caller.
29 class NET_EXPORT_PRIVATE HttpTransaction { 30 class NET_EXPORT_PRIVATE HttpTransaction {
30 public: 31 public:
31 // If |*defer| is set to true, the transaction will wait until 32 // If |*defer| is set to true, the transaction will wait until
32 // ResumeNetworkStart is called before establishing a connection. 33 // ResumeNetworkStart is called before establishing a connection.
33 typedef base::Callback<void(bool* defer)> BeforeNetworkStartCallback; 34 typedef base::Callback<void(bool* defer)> BeforeNetworkStartCallback;
34 35
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // info is not available. 127 // info is not available.
127 virtual const HttpResponseInfo* GetResponseInfo() const = 0; 128 virtual const HttpResponseInfo* GetResponseInfo() const = 0;
128 129
129 // Returns the load state for this transaction. 130 // Returns the load state for this transaction.
130 virtual LoadState GetLoadState() const = 0; 131 virtual LoadState GetLoadState() const = 0;
131 132
132 // Returns the upload progress in bytes. If there is no upload data, 133 // Returns the upload progress in bytes. If there is no upload data,
133 // zero will be returned. This does not include the request headers. 134 // zero will be returned. This does not include the request headers.
134 virtual UploadProgress GetUploadProgress() const = 0; 135 virtual UploadProgress GetUploadProgress() const = 0;
135 136
137 // SetSSLHostInfo sets a object which reads and writes public information
138 // about an SSL server. It's used to implement Snap Start.
139 // TODO(agl): remove this.
wtc 2014/01/15 19:08:59 Remove "It's used to implement Snap Start." and "T
ramant (doing other things) 2014/01/18 00:21:56 Done.
140 virtual void SetSSLHostInfo(SSLHostInfo*) { };
141
136 // Populates all of load timing, except for request start times and receive 142 // Populates all of load timing, except for request start times and receive
137 // headers time. 143 // headers time.
138 // |load_timing_info| must have all null times when called. Returns false and 144 // |load_timing_info| must have all null times when called. Returns false and
139 // does not modify |load_timing_info| if there's no timing information to 145 // does not modify |load_timing_info| if there's no timing information to
140 // provide. 146 // provide.
141 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const = 0; 147 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const = 0;
142 148
143 // Called when the priority of the parent job changes. 149 // Called when the priority of the parent job changes.
144 virtual void SetPriority(RequestPriority priority) = 0; 150 virtual void SetPriority(RequestPriority priority) = 0;
145 151
146 // Set the WebSocketHandshakeStreamBase::CreateHelper to be used for the 152 // Set the WebSocketHandshakeStreamBase::CreateHelper to be used for the
147 // request. Only relevant to WebSocket transactions. Must be called before 153 // request. Only relevant to WebSocket transactions. Must be called before
148 // Start(). Ownership of |create_helper| remains with the caller. 154 // Start(). Ownership of |create_helper| remains with the caller.
149 virtual void SetWebSocketHandshakeStreamCreateHelper( 155 virtual void SetWebSocketHandshakeStreamCreateHelper(
150 WebSocketHandshakeStreamBase::CreateHelper* create_helper) = 0; 156 WebSocketHandshakeStreamBase::CreateHelper* create_helper) = 0;
151 157
152 // Set the callback to receive notification just before network use. 158 // Set the callback to receive notification just before network use.
153 virtual void SetBeforeNetworkStartCallback( 159 virtual void SetBeforeNetworkStartCallback(
154 const BeforeNetworkStartCallback& callback) = 0; 160 const BeforeNetworkStartCallback& callback) = 0;
155 161
156 // Resumes the transaction after being deferred. 162 // Resumes the transaction after being deferred.
157 virtual int ResumeNetworkStart() = 0; 163 virtual int ResumeNetworkStart() = 0;
158 }; 164 };
159 165
160 } // namespace net 166 } // namespace net
161 167
162 #endif // NET_HTTP_HTTP_TRANSACTION_H_ 168 #endif // NET_HTTP_HTTP_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698