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

Side by Side Diff: net/quic/test_tools/crypto_test_utils_chromium.cc

Issue 330333006: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linus_tsan error - reverted the change to ConnectionMigrationClientPortChanged unitttest Created 6 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | net/quic/test_tools/mock_quic_dispatcher.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/quic/test_tools/crypto_test_utils.h" 5 #include "net/quic/test_tools/crypto_test_utils.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "net/base/test_data_directory.h" 9 #include "net/base/test_data_directory.h"
10 #include "net/cert/cert_verifier.h" 10 #include "net/cert/cert_verifier.h"
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 TestProofVerifierChromium(CertVerifier* cert_verifier, 23 TestProofVerifierChromium(CertVerifier* cert_verifier,
24 const std::string& cert_file) 24 const std::string& cert_file)
25 : ProofVerifierChromium(cert_verifier), 25 : ProofVerifierChromium(cert_verifier),
26 cert_verifier_(cert_verifier) { 26 cert_verifier_(cert_verifier) {
27 // Load and install the root for the validated chain. 27 // Load and install the root for the validated chain.
28 scoped_refptr<X509Certificate> root_cert = 28 scoped_refptr<X509Certificate> root_cert =
29 ImportCertFromFile(GetTestCertsDirectory(), cert_file); 29 ImportCertFromFile(GetTestCertsDirectory(), cert_file);
30 scoped_root_.Reset(root_cert.get()); 30 scoped_root_.Reset(root_cert.get());
31 } 31 }
32 virtual ~TestProofVerifierChromium() { } 32 virtual ~TestProofVerifierChromium() {}
33 33
34 private: 34 private:
35 ScopedTestRoot scoped_root_; 35 ScopedTestRoot scoped_root_;
36 scoped_ptr<CertVerifier> cert_verifier_; 36 scoped_ptr<CertVerifier> cert_verifier_;
37 }; 37 };
38 38
39 // static 39 // static
40 ProofSource* CryptoTestUtils::ProofSourceForTesting() { 40 ProofSource* CryptoTestUtils::ProofSourceForTesting() {
41 return new ProofSourceChromium(); 41 return new ProofSourceChromium();
42 } 42 }
43 43
44 // static 44 // static
45 ProofVerifier* CryptoTestUtils::ProofVerifierForTesting() { 45 ProofVerifier* CryptoTestUtils::ProofVerifierForTesting() {
46 TestProofVerifierChromium* proof_verifier = new TestProofVerifierChromium( 46 TestProofVerifierChromium* proof_verifier = new TestProofVerifierChromium(
47 CertVerifier::CreateDefault(), "quic_root.crt"); 47 CertVerifier::CreateDefault(), "quic_root.crt");
48 return proof_verifier; 48 return proof_verifier;
49 } 49 }
50 50
51 // static 51 // static
52 ProofVerifyContext* CryptoTestUtils::ProofVerifyContextForTesting() { 52 ProofVerifyContext* CryptoTestUtils::ProofVerifyContextForTesting() {
53 return new ProofVerifyContextChromium(BoundNetLog()); 53 return new ProofVerifyContextChromium(BoundNetLog());
54 } 54 }
55 55
56 } // namespace test 56 } // namespace test
57 57
58 } // namespace net 58 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | net/quic/test_tools/mock_quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698