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

Side by Side Diff: net/url_request/url_request_http_job.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 void SaveCookiesAndNotifyHeadersComplete(int result); 81 void SaveCookiesAndNotifyHeadersComplete(int result);
82 void SaveNextCookie(); 82 void SaveNextCookie();
83 void FetchResponseCookies(std::vector<std::string>* cookies); 83 void FetchResponseCookies(std::vector<std::string>* cookies);
84 84
85 // Processes the Strict-Transport-Security header, if one exists. 85 // Processes the Strict-Transport-Security header, if one exists.
86 void ProcessStrictTransportSecurityHeader(); 86 void ProcessStrictTransportSecurityHeader();
87 87
88 // Processes the Public-Key-Pins header, if one exists. 88 // Processes the Public-Key-Pins header, if one exists.
89 void ProcessPublicKeyPinsHeader(); 89 void ProcessPublicKeyPinsHeader();
90 90
91 // TODO(battre) Remove this when crbug.com/289715 is fixed.
92 static void OnHeadersReceivedCallbackForDebugging(
93 base::WeakPtr<URLRequestHttpJob> job,
94 int result);
95
96 // |result| should be net::OK, or the request is canceled. 91 // |result| should be net::OK, or the request is canceled.
97 void OnHeadersReceivedCallback(int result); 92 void OnHeadersReceivedCallback(int result);
98 void OnStartCompleted(int result); 93 void OnStartCompleted(int result);
99 void OnReadCompleted(int result); 94 void OnReadCompleted(int result);
100 void NotifyBeforeSendHeadersCallback(int result); 95 void NotifyBeforeSendHeadersCallback(int result);
101 void NotifyBeforeSendProxyHeadersCallback( 96 void NotifyBeforeSendProxyHeadersCallback(
102 const ProxyInfo& proxy_info, 97 const ProxyInfo& proxy_info,
103 HttpRequestHeaders* request_headers); 98 HttpRequestHeaders* request_headers);
104 99
105 void RestartTransactionWithAuth(const AuthCredentials& credentials); 100 void RestartTransactionWithAuth(const AuthCredentials& credentials);
(...skipping 28 matching lines...) Expand all
134 129
135 HostPortPair GetSocketAddress() const override; 130 HostPortPair GetSocketAddress() const override;
136 void NotifyURLRequestDestroyed() override; 131 void NotifyURLRequestDestroyed() override;
137 132
138 void RecordTimer(); 133 void RecordTimer();
139 void ResetTimer(); 134 void ResetTimer();
140 135
141 void UpdatePacketReadTimes() override; 136 void UpdatePacketReadTimes() override;
142 void RecordPacketStats(FilterContext::StatisticSelector statistic) const; 137 void RecordPacketStats(FilterContext::StatisticSelector statistic) const;
143 138
144 void RecordCompressionHistograms();
145 bool IsCompressibleContent() const;
146
147 // Starts the transaction if extensions using the webrequest API do not 139 // Starts the transaction if extensions using the webrequest API do not
148 // object. 140 // object.
149 void StartTransaction(); 141 void StartTransaction();
150 // If |result| is net::OK, calls StartTransactionInternal. Otherwise notifies 142 // If |result| is net::OK, calls StartTransactionInternal. Otherwise notifies
151 // cancellation. 143 // cancellation.
152 void MaybeStartTransactionInternal(int result); 144 void MaybeStartTransactionInternal(int result);
153 void StartTransactionInternal(); 145 void StartTransactionInternal();
154 146
155 void RecordPerfHistograms(CompletionCause reason); 147 void RecordPerfHistograms(CompletionCause reason);
156 void DoneWithRequest(CompletionCause reason); 148 void DoneWithRequest(CompletionCause reason);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 257
266 // Flag used to verify that |this| is not deleted while we are awaiting 258 // Flag used to verify that |this| is not deleted while we are awaiting
267 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. 259 // a callback from the NetworkDelegate. Used as a fail-fast mechanism.
268 // True if we are waiting a callback and 260 // True if we are waiting a callback and
269 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, 261 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet,
270 // to inform the NetworkDelegate that it may not call back. 262 // to inform the NetworkDelegate that it may not call back.
271 bool awaiting_callback_; 263 bool awaiting_callback_;
272 264
273 const HttpUserAgentSettings* http_user_agent_settings_; 265 const HttpUserAgentSettings* http_user_agent_settings_;
274 266
275 // TODO(battre) Remove this when crbug.com/289715 is fixed.
276 enum TransactionState {
277 TRANSACTION_WAS_NOT_INITIALIZED,
278 TRANSACTION_WAS_INITIALIZED,
279 TRANSACTION_WAS_DESTROYED
280 };
281 TransactionState transaction_state_;
282
283 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; 267 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_;
284 268
285 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); 269 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob);
286 }; 270 };
287 271
288 } // namespace net 272 } // namespace net
289 273
290 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ 274 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698