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

Side by Side Diff: net/http/failing_http_transaction_factory.cc

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/cert/x509_util_unittest.cc ('k') | net/http/http_cache_transaction.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "net/http/failing_http_transaction_factory.h" 5 #include "net/http/failing_http_transaction_factory.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 23 matching lines...) Expand all
34 class FailingHttpTransaction : public HttpTransaction { 34 class FailingHttpTransaction : public HttpTransaction {
35 public: 35 public:
36 explicit FailingHttpTransaction(Error error); 36 explicit FailingHttpTransaction(Error error);
37 ~FailingHttpTransaction() override; 37 ~FailingHttpTransaction() override;
38 38
39 // HttpTransaction 39 // HttpTransaction
40 int Start(const HttpRequestInfo* request_info, 40 int Start(const HttpRequestInfo* request_info,
41 const CompletionCallback& callback, 41 const CompletionCallback& callback,
42 const NetLogWithSource& net_log) override; 42 const NetLogWithSource& net_log) override;
43 int RestartIgnoringLastError(const CompletionCallback& callback) override; 43 int RestartIgnoringLastError(const CompletionCallback& callback) override;
44 int RestartWithCertificate(X509Certificate* client_cert, 44 int RestartWithCertificate(scoped_refptr<X509Certificate> client_cert,
45 SSLPrivateKey* client_private_key, 45 scoped_refptr<SSLPrivateKey> client_private_key,
46 const CompletionCallback& callback) override; 46 const CompletionCallback& callback) override;
47 int RestartWithAuth(const AuthCredentials& credentials, 47 int RestartWithAuth(const AuthCredentials& credentials,
48 const CompletionCallback& callback) override; 48 const CompletionCallback& callback) override;
49 bool IsReadyToRestartForAuth() override; 49 bool IsReadyToRestartForAuth() override;
50 int Read(IOBuffer* buf, 50 int Read(IOBuffer* buf,
51 int buf_len, 51 int buf_len,
52 const CompletionCallback& callback) override; 52 const CompletionCallback& callback) override;
53 void StopCaching() override; 53 void StopCaching() override;
54 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; 54 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
55 int64_t GetTotalReceivedBytes() const override; 55 int64_t GetTotalReceivedBytes() const override;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 base::Bind(callback, error_)); 89 base::Bind(callback, error_));
90 return ERR_IO_PENDING; 90 return ERR_IO_PENDING;
91 } 91 }
92 92
93 int FailingHttpTransaction::RestartIgnoringLastError( 93 int FailingHttpTransaction::RestartIgnoringLastError(
94 const CompletionCallback& callback) { 94 const CompletionCallback& callback) {
95 return ERR_FAILED; 95 return ERR_FAILED;
96 } 96 }
97 97
98 int FailingHttpTransaction::RestartWithCertificate( 98 int FailingHttpTransaction::RestartWithCertificate(
99 X509Certificate* client_cert, 99 scoped_refptr<X509Certificate> client_cert,
100 SSLPrivateKey* client_private_key, 100 scoped_refptr<SSLPrivateKey> client_private_key,
101 const CompletionCallback& callback) { 101 const CompletionCallback& callback) {
102 return ERR_FAILED; 102 return ERR_FAILED;
103 } 103 }
104 104
105 int FailingHttpTransaction::RestartWithAuth( 105 int FailingHttpTransaction::RestartWithAuth(
106 const AuthCredentials& credentials, 106 const AuthCredentials& credentials,
107 const CompletionCallback& callback) { 107 const CompletionCallback& callback) {
108 return ERR_FAILED; 108 return ERR_FAILED;
109 } 109 }
110 110
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 HttpCache* FailingHttpTransactionFactory::GetCache() { 208 HttpCache* FailingHttpTransactionFactory::GetCache() {
209 return NULL; 209 return NULL;
210 } 210 }
211 211
212 HttpNetworkSession* FailingHttpTransactionFactory::GetSession() { 212 HttpNetworkSession* FailingHttpTransactionFactory::GetSession() {
213 return session_; 213 return session_;
214 } 214 }
215 215
216 } // namespace net 216 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_util_unittest.cc ('k') | net/http/http_cache_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698