Commit 3bd28233 authored by Josh Nohle's avatar Josh Nohle Committed by Commit Bot

Make ctor explicit and factory dtor virtual in CryptAuthKeyRegistryImpl

Note: The C++ style guide states, "Type conversion operators, and
constructors that are callable with a single argument, must be marked
explicit in the class definition."

Bug: 899080
Change-Id: I013f807d451fd540190dbd8f06b1977a83b6b013
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1521280
Commit-Queue: Josh Nohle <nohle@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Auto-Submit: Josh Nohle <nohle@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642351}
parent d188d1ee
......@@ -33,6 +33,8 @@ void CryptAuthKeyRegistryImpl::Factory::SetFactoryForTesting(
test_factory_ = test_factory;
}
CryptAuthKeyRegistryImpl::Factory::~Factory() = default;
std::unique_ptr<CryptAuthKeyRegistry>
CryptAuthKeyRegistryImpl::Factory::BuildInstance(PrefService* pref_service) {
return base::WrapUnique(new CryptAuthKeyRegistryImpl(pref_service));
......
......@@ -26,6 +26,7 @@ class CryptAuthKeyRegistryImpl : public CryptAuthKeyRegistry {
public:
static Factory* Get();
static void SetFactoryForTesting(Factory* test_factory);
virtual ~Factory();
virtual std::unique_ptr<CryptAuthKeyRegistry> BuildInstance(
PrefService* pref_service);
......@@ -41,7 +42,7 @@ class CryptAuthKeyRegistryImpl : public CryptAuthKeyRegistry {
private:
// Populates the in-memory key bundle map with the enrolled key bundles
// persisted in a pref.
CryptAuthKeyRegistryImpl(PrefService* pref_service);
explicit CryptAuthKeyRegistryImpl(PrefService* pref_service);
// CryptAuthKeyRegistry:
void OnKeyRegistryUpdated() override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment