face: ProtocolFactory registry

refs #3904

Change-Id: Ic7c8b3d6138b7c27d4189a2e15cc646055ad1294
diff --git a/daemon/face/face-system.hpp b/daemon/face/face-system.hpp
index f6a7c71..bca7702 100644
--- a/daemon/face/face-system.hpp
+++ b/daemon/face/face-system.hpp
@@ -50,6 +50,8 @@
   explicit
   FaceSystem(FaceTable& faceTable);
 
+  ~FaceSystem();
+
   /** \return ProtocolFactory objects owned by the FaceSystem
    */
   std::set<const ProtocolFactory*>
@@ -100,17 +102,15 @@
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   /** \brief config section name => protocol factory
-   *
-   *  \todo #3904 store unique_ptr<ProtocolFactory> here, and reference_wrapper<ProtocolFactory>
-   *              in m_factoryByScheme
    */
-  std::map<std::string, shared_ptr<ProtocolFactory>> m_factories;
+  std::map<std::string, unique_ptr<ProtocolFactory>> m_factories;
 
+private:
   /** \brief scheme => protocol factory
    *
    *  The same protocol factory may be available under multiple schemes.
    */
-  std::map<std::string, shared_ptr<ProtocolFactory>> m_factoryByScheme;
+  std::map<std::string, ProtocolFactory*> m_factoryByScheme;
 
   FaceTable& m_faceTable;
 };