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

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

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: . Created 3 years, 6 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
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 // 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
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Generates a failure when attempting to conditionalize a network request. 127 // Generates a failure when attempting to conditionalize a network request.
128 void FailConditionalizationForTest() { 128 void FailConditionalizationForTest() {
129 fail_conditionalization_for_test_ = true; 129 fail_conditionalization_for_test_ = true;
130 } 130 }
131 131
132 // HttpTransaction methods: 132 // HttpTransaction methods:
133 int Start(const HttpRequestInfo* request_info, 133 int Start(const HttpRequestInfo* request_info,
134 const CompletionCallback& callback, 134 const CompletionCallback& callback,
135 const NetLogWithSource& net_log) override; 135 const NetLogWithSource& net_log) override;
136 int RestartIgnoringLastError(const CompletionCallback& callback) override; 136 int RestartIgnoringLastError(const CompletionCallback& callback) override;
137 int RestartWithCertificate(X509Certificate* client_cert, 137 int RestartWithCertificate(scoped_refptr<X509Certificate> client_cert,
138 SSLPrivateKey* client_private_key, 138 scoped_refptr<SSLPrivateKey> client_private_key,
139 const CompletionCallback& callback) override; 139 const CompletionCallback& callback) override;
140 int RestartWithAuth(const AuthCredentials& credentials, 140 int RestartWithAuth(const AuthCredentials& credentials,
141 const CompletionCallback& callback) override; 141 const CompletionCallback& callback) override;
142 bool IsReadyToRestartForAuth() override; 142 bool IsReadyToRestartForAuth() override;
143 int Read(IOBuffer* buf, 143 int Read(IOBuffer* buf,
144 int buf_len, 144 int buf_len,
145 const CompletionCallback& callback) override; 145 const CompletionCallback& callback) override;
146 void StopCaching() override; 146 void StopCaching() override;
147 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; 147 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
148 int64_t GetTotalReceivedBytes() const override; 148 int64_t GetTotalReceivedBytes() const override;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // conditionalized internally in response to LOAD_VALIDATE_CACHE). 324 // conditionalized internally in response to LOAD_VALIDATE_CACHE).
325 // Returns a network error code. 325 // Returns a network error code.
326 int BeginExternallyConditionalizedRequest(); 326 int BeginExternallyConditionalizedRequest();
327 327
328 // Called to restart a network transaction after an error. Returns network 328 // Called to restart a network transaction after an error. Returns network
329 // error code. 329 // error code.
330 int RestartNetworkRequest(); 330 int RestartNetworkRequest();
331 331
332 // Called to restart a network transaction with a client certificate. 332 // Called to restart a network transaction with a client certificate.
333 // Returns network error code. 333 // Returns network error code.
334 int RestartNetworkRequestWithCertificate(X509Certificate* client_cert, 334 int RestartNetworkRequestWithCertificate(
335 SSLPrivateKey* client_private_key); 335 scoped_refptr<X509Certificate> client_cert,
336 scoped_refptr<SSLPrivateKey> client_private_key);
336 337
337 // Called to restart a network transaction with authentication credentials. 338 // Called to restart a network transaction with authentication credentials.
338 // Returns network error code. 339 // Returns network error code.
339 int RestartNetworkRequestWithAuth(const AuthCredentials& credentials); 340 int RestartNetworkRequestWithAuth(const AuthCredentials& credentials);
340 341
341 // Called to determine if we need to validate the cache entry before using it. 342 // Called to determine if we need to validate the cache entry before using it.
342 bool RequiresValidation(); 343 bool RequiresValidation();
343 344
344 // Called to make the request conditional (to ask the server if the cached 345 // Called to make the request conditional (to ask the server if the cached
345 // copy is valid). Returns true if able to make the request conditional. 346 // copy is valid). Returns true if able to make the request conditional.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 bool in_do_loop_; 516 bool in_do_loop_;
516 517
517 base::WeakPtrFactory<Transaction> weak_factory_; 518 base::WeakPtrFactory<Transaction> weak_factory_;
518 519
519 DISALLOW_COPY_AND_ASSIGN(Transaction); 520 DISALLOW_COPY_AND_ASSIGN(Transaction);
520 }; 521 };
521 522
522 } // namespace net 523 } // namespace net
523 524
524 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 525 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698