Avoid static_cast<SSLClientSocket>(StreamSocket).
Move four methods: GetSSLCertRequestInfo(), GetChannelIDService(),
GetTokenBindingSignature(), and GetChannelIDKey() from SSLClientSocket
to its base class's base class, StreamSocket. Also make
GetSSLCertRequestInfo() const. Provide dummy implementations, with
NOTREACHED(), in base class, to make it less painful to implement a new
derived class.
Remove 11 accounts of static_cast<SSLClientSocket*>(StreamSocket). The
only remaining invocations are within SSLClientSocketImpl.
Bug: 826713
Change-Id: I1f87d31204b95687e6552b7d6f02578de4321eaf
Reviewed-on: https://chromium-review.googlesource.com/1010106
Commit-Queue: Bence Béky <[email protected]>
Reviewed-by: Istiaque Ahmed <[email protected]>
Reviewed-by: Nick Harper <[email protected]>
Cr-Commit-Position: refs/heads/master@{#550554}
diff --git a/net/socket/ssl_client_socket_impl.h b/net/socket/ssl_client_socket_impl.h
index 8e084e9e..cd7b7c1 100644
--- a/net/socket/ssl_client_socket_impl.h
+++ b/net/socket/ssl_client_socket_impl.h
@@ -82,14 +82,6 @@
static void SetSSLKeyLogFile(const base::FilePath& path);
#endif
- // SSLClientSocket implementation.
- void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
- ChannelIDService* GetChannelIDService() const override;
- Error GetTokenBindingSignature(crypto::ECPrivateKey* key,
- TokenBindingType tb_type,
- std::vector<uint8_t>* out) override;
- crypto::ECPrivateKey* GetChannelIDKey() const override;
-
// SSLSocket implementation.
int ExportKeyingMaterial(const base::StringPiece& label,
bool has_context,
@@ -116,6 +108,14 @@
void AddConnectionAttempts(const ConnectionAttempts& attempts) override {}
int64_t GetTotalReceivedBytes() const override;
void DumpMemoryStats(SocketMemoryStats* stats) const override;
+ void GetSSLCertRequestInfo(
+ SSLCertRequestInfo* cert_request_info) const override;
+ ChannelIDService* GetChannelIDService() const override;
+ Error GetTokenBindingSignature(crypto::ECPrivateKey* key,
+ TokenBindingType tb_type,
+ std::vector<uint8_t>* out) override;
+ crypto::ECPrivateKey* GetChannelIDKey() const override;
+
void ApplySocketTag(const SocketTag& tag) override;
// Dumps memory allocation stats. |pmd| is the browser process memory dump.