diff options
Diffstat (limited to 'chromium/net')
-rw-r--r-- | chromium/net/cert/cert_database_nss.cc | 7 | ||||
-rw-r--r-- | chromium/net/quic/quic_connection.cc | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/chromium/net/cert/cert_database_nss.cc b/chromium/net/cert/cert_database_nss.cc index 1ff8862e20d..2073de1890b 100644 --- a/chromium/net/cert/cert_database_nss.cc +++ b/chromium/net/cert/cert_database_nss.cc @@ -57,7 +57,12 @@ int CertDatabase::CheckUserCert(X509Certificate* cert_obj) { int CertDatabase::AddUserCert(X509Certificate* cert_obj) { CertificateList cert_list; cert_list.push_back(cert_obj); - return psm::ImportUserCert(cert_list); + int result = psm::ImportUserCert(cert_list); + + if (result == OK) + NotifyObserversOfCertAdded(NULL); + + return result; } } // namespace net diff --git a/chromium/net/quic/quic_connection.cc b/chromium/net/quic/quic_connection.cc index df2efe48f22..75c761a3e1f 100644 --- a/chromium/net/quic/quic_connection.cc +++ b/chromium/net/quic/quic_connection.cc @@ -18,6 +18,7 @@ #include "base/logging.h" #include "base/macros.h" #include "base/memory/ref_counted.h" +#include "base/metrics/histogram_macros.h" #include "base/stl_util.h" #include "base/strings/stringprintf.h" #include "net/base/net_errors.h" @@ -2040,7 +2041,14 @@ void QuicConnection::CloseConnection(QuicErrorCode error, bool from_peer) { } connected_ = false; DCHECK(visitor_ != nullptr); - visitor_->OnConnectionClosed(error, from_peer); + // TODO(rtenneti): crbug.com/546668. A temporary fix. Added a check for null + // |visitor_| to fix crash bug. Delete |visitor_| check and histogram after + // fix is merged. + if (visitor_) { + visitor_->OnConnectionClosed(error, from_peer); + } else { + UMA_HISTOGRAM_BOOLEAN("Net.QuicCloseConnection.NullVisitor", true); + } if (debug_visitor_ != nullptr) { debug_visitor_->OnConnectionClosed(error, from_peer); } |