forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a default QuicCryptoClientStreamFactory
so that QuicChromiumClientSession does not have to special-case when no CryptoStreamFactory is available. Review URL: https://codereview.chromium.org/1563643002 Cr-Commit-Position: refs/heads/master@{#367715}
- Loading branch information
1 parent
907d1b7
commit 1f83eaf
Showing
8 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright (c) 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "net/quic/quic_crypto_client_stream_factory.h" | ||
|
||
#include "base/lazy_instance.h" | ||
#include "net/quic/crypto/proof_verifier_chromium.h" | ||
#include "net/quic/quic_chromium_client_session.h" | ||
#include "net/quic/quic_crypto_client_stream.h" | ||
|
||
namespace net { | ||
|
||
namespace { | ||
|
||
class DefaultCryptoStreamFactory : public QuicCryptoClientStreamFactory { | ||
public: | ||
QuicCryptoClientStream* CreateQuicCryptoClientStream( | ||
const QuicServerId& server_id, | ||
QuicChromiumClientSession* session, | ||
scoped_ptr<ProofVerifyContext> proof_verify_context, | ||
QuicCryptoClientConfig* crypto_config) override { | ||
return new QuicCryptoClientStream( | ||
server_id, session, proof_verify_context.release(), crypto_config); | ||
} | ||
}; | ||
|
||
static base::LazyInstance<DefaultCryptoStreamFactory>::Leaky | ||
g_default_crypto_stream_factory = LAZY_INSTANCE_INITIALIZER; | ||
|
||
} // namespace | ||
|
||
// static | ||
QuicCryptoClientStreamFactory* | ||
QuicCryptoClientStreamFactory::GetDefaultFactory() { | ||
return g_default_crypto_stream_factory.Pointer(); | ||
} | ||
|
||
} // namespace net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters