diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-11-04 13:20:57 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-11-13 21:16:28 +0100 |
commit | 6b25e22685cfe434bb17db006c33db7341ca7028 (patch) | |
tree | 3691ca5d33b3497940fd66e4d44b538367a00622 /src/core/net/ssl_host_state_delegate_qt.cpp | |
parent | 723a0d074ef96083eecae58d3dbed78339a68402 (diff) |
Code-style cleanup in src/core/net
Picking suggested changes for a clang-format run.
Change-Id: I3539dee65f153257015af4a8670312e74980a9e4
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core/net/ssl_host_state_delegate_qt.cpp')
-rw-r--r-- | src/core/net/ssl_host_state_delegate_qt.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/core/net/ssl_host_state_delegate_qt.cpp b/src/core/net/ssl_host_state_delegate_qt.cpp index b6cdf68dc..0885475be 100644 --- a/src/core/net/ssl_host_state_delegate_qt.cpp +++ b/src/core/net/ssl_host_state_delegate_qt.cpp @@ -67,19 +67,15 @@ bool CertPolicy::Check(const net::X509Certificate &cert, int error) const return false; } -void CertPolicy::Allow(const net::X509Certificate& cert, int error) +void CertPolicy::Allow(const net::X509Certificate &cert, int error) { net::SHA256HashValue fingerprint = cert.CalculateChainFingerprint256(); m_allowed[fingerprint] |= error; } -SSLHostStateDelegateQt::SSLHostStateDelegateQt() -{ -} +SSLHostStateDelegateQt::SSLHostStateDelegateQt() {} -SSLHostStateDelegateQt::~SSLHostStateDelegateQt() -{ -} +SSLHostStateDelegateQt::~SSLHostStateDelegateQt() {} void SSLHostStateDelegateQt::AllowCert(const std::string &host, const net::X509Certificate &cert, int error) { @@ -87,7 +83,7 @@ void SSLHostStateDelegateQt::AllowCert(const std::string &host, const net::X509C } // Clear all allow preferences. -void SSLHostStateDelegateQt::Clear(const base::Callback<bool(const std::string&)>& host_filter) +void SSLHostStateDelegateQt::Clear(const base::Callback<bool(const std::string &)> &host_filter) { if (host_filter.is_null()) { m_certPolicyforHost.clear(); @@ -107,9 +103,10 @@ void SSLHostStateDelegateQt::Clear(const base::Callback<bool(const std::string&) // Queries whether |cert| is allowed for |host| and |error|. Returns true in // |expired_previous_decision| if a previous user decision expired immediately // prior to this query, otherwise false. -content::SSLHostStateDelegate::CertJudgment SSLHostStateDelegateQt::QueryPolicy( - const std::string &host, const net::X509Certificate &cert, - int error, bool */*expired_previous_decision*/) +content::SSLHostStateDelegate::CertJudgment SSLHostStateDelegateQt::QueryPolicy(const std::string &host, + const net::X509Certificate &cert, + int error, + bool * /*expired_previous_decision*/) { return m_certPolicyforHost[host].Check(cert, error) ? SSLHostStateDelegate::ALLOWED : SSLHostStateDelegate::DENIED; } |