• Omar Morsi's avatar
    Support functions usage without NSSCertDB instance · ad90e72d
    Omar Morsi authored
    Some NSS Certificate Database functions that return information about
    certificates are expensive and should not be called on the UI thread.
    This CL is part of the effort of normalizing the way of gathering this
    certificates information to make sure it is gathered on a worker thread.
    To call these functions on a worker thread, they should not depend on
    NSSCertDatabase instances, so if the instances goes out of scope, the
    code does not run into undefined behaviour.
    
    In this CL some NSS Certificate Database functions that does not depend
    on database instances are converted to static to be able to use them
    safely inside worker threads.
    
    1- net_unittests --gtest_filter=NSSCertDatabase*
    2- unittests --gtest_filter=CertificateManagerModel*
    
    Bug: chromium:1043083, chromium:1012430
    Test: 
    Change-Id: I63a1157c5d92b44f8d5252e9475104a1adfa8376
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2054090Reviewed-by: default avatarRyan Sleevi <rsleevi@chromium.org>
    Reviewed-by: default avatarMatt Mueller <mattm@chromium.org>
    Reviewed-by: default avatarPavol Marko <pmarko@chromium.org>
    Commit-Queue: Omar Morsi <omorsi@google.com>
    Cr-Commit-Position: refs/heads/master@{#743023}
    ad90e72d
nss_cert_database.h 11.6 KB