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

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

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: removed no longer needed forward declaration 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
« no previous file with comments | « net/http/failing_http_transaction_factory.cc ('k') | net/http/http_cache_transaction.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 // 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Generates a failure when attempting to conditionalize a network request. 131 // Generates a failure when attempting to conditionalize a network request.
132 void FailConditionalizationForTest() { 132 void FailConditionalizationForTest() {
133 fail_conditionalization_for_test_ = true; 133 fail_conditionalization_for_test_ = true;
134 } 134 }
135 135
136 // HttpTransaction methods: 136 // HttpTransaction methods:
137 int Start(const HttpRequestInfo* request_info, 137 int Start(const HttpRequestInfo* request_info,
138 const CompletionCallback& callback, 138 const CompletionCallback& callback,
139 const NetLogWithSource& net_log) override; 139 const NetLogWithSource& net_log) override;
140 int RestartIgnoringLastError(const CompletionCallback& callback) override; 140 int RestartIgnoringLastError(const CompletionCallback& callback) override;
141 int RestartWithCertificate(X509Certificate* client_cert, 141 int RestartWithCertificate(scoped_refptr<X509Certificate> client_cert,
142 SSLPrivateKey* client_private_key, 142 scoped_refptr<SSLPrivateKey> client_private_key,
143 const CompletionCallback& callback) override; 143 const CompletionCallback& callback) override;
144 int RestartWithAuth(const AuthCredentials& credentials, 144 int RestartWithAuth(const AuthCredentials& credentials,
145 const CompletionCallback& callback) override; 145 const CompletionCallback& callback) override;
146 bool IsReadyToRestartForAuth() override; 146 bool IsReadyToRestartForAuth() override;
147 int Read(IOBuffer* buf, 147 int Read(IOBuffer* buf,
148 int buf_len, 148 int buf_len,
149 const CompletionCallback& callback) override; 149 const CompletionCallback& callback) override;
150 void StopCaching() override; 150 void StopCaching() override;
151 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; 151 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
152 int64_t GetTotalReceivedBytes() const override; 152 int64_t GetTotalReceivedBytes() const override;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 // conditionalized internally in response to LOAD_VALIDATE_CACHE). 350 // conditionalized internally in response to LOAD_VALIDATE_CACHE).
351 // Returns a network error code. 351 // Returns a network error code.
352 int BeginExternallyConditionalizedRequest(); 352 int BeginExternallyConditionalizedRequest();
353 353
354 // Called to restart a network transaction after an error. Returns network 354 // Called to restart a network transaction after an error. Returns network
355 // error code. 355 // error code.
356 int RestartNetworkRequest(); 356 int RestartNetworkRequest();
357 357
358 // Called to restart a network transaction with a client certificate. 358 // Called to restart a network transaction with a client certificate.
359 // Returns network error code. 359 // Returns network error code.
360 int RestartNetworkRequestWithCertificate(X509Certificate* client_cert, 360 int RestartNetworkRequestWithCertificate(
361 SSLPrivateKey* client_private_key); 361 scoped_refptr<X509Certificate> client_cert,
362 scoped_refptr<SSLPrivateKey> client_private_key);
362 363
363 // Called to restart a network transaction with authentication credentials. 364 // Called to restart a network transaction with authentication credentials.
364 // Returns network error code. 365 // Returns network error code.
365 int RestartNetworkRequestWithAuth(const AuthCredentials& credentials); 366 int RestartNetworkRequestWithAuth(const AuthCredentials& credentials);
366 367
367 // Called to determine if we need to validate the cache entry before using it. 368 // Called to determine if we need to validate the cache entry before using it.
368 bool RequiresValidation(); 369 bool RequiresValidation();
369 370
370 // Called to make the request conditional (to ask the server if the cached 371 // Called to make the request conditional (to ask the server if the cached
371 // copy is valid). Returns true if able to make the request conditional. 372 // copy is valid). Returns true if able to make the request conditional.
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 bool in_do_loop_; 553 bool in_do_loop_;
553 554
554 base::WeakPtrFactory<Transaction> weak_factory_; 555 base::WeakPtrFactory<Transaction> weak_factory_;
555 556
556 DISALLOW_COPY_AND_ASSIGN(Transaction); 557 DISALLOW_COPY_AND_ASSIGN(Transaction);
557 }; 558 };
558 559
559 } // namespace net 560 } // namespace net
560 561
561 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 562 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_
OLDNEW
« no previous file with comments | « net/http/failing_http_transaction_factory.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698