• pneubeck@chromium.org's avatar
    Extract ScopedTestNSSDB from nss_util. · 190933f2
    pneubeck@chromium.org authored
    Before ScopedTestNSSDB affected several slot getters from nss_util.h .
    This change reduces ScopedTestNSSDB to solely setup a temporary test DB and not influencing the global state in nss_util anymore.
    As a replacement for some of its old behavior, a new ScopedTestSystemNSSKeySlot is added, which allows to override the slot returned by GetSystemNSSKeySlot().
    With this change it's now possible to write tests that need both a user and system NSS DB by using ScopedTestSystemNSSKeySlot.
    As a side-effect, GetPersistentNSSKeySlot() is now compiled on !OS_CHROMEOS only.
    (For include changes:)
    TBR=nkostylev@chromium.org, stevenjb@chromium.org
    Review URL: https://codereview.chromium.org/401623006
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285881 0039d316-1c4b-4281-b951-d872f2087c98
nss_util_internal.h 4.42 KB