diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index 0c94fea..b8506ac 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -55,7 +55,7 @@
 FaceManager::FaceManager(FaceTable& faceTable,
                          Dispatcher& dispatcher,
                          CommandValidator& validator)
-  : ManagerBase(dispatcher, validator, "faces")
+  : NfdManagerBase(dispatcher, validator, "faces")
   , m_faceTable(faceTable)
 {
   registerCommandHandler<ndn::nfd::FaceCreateCommand>("create",
diff --git a/daemon/mgmt/face-manager.hpp b/daemon/mgmt/face-manager.hpp
index fda4fbe..b97a629 100644
--- a/daemon/mgmt/face-manager.hpp
+++ b/daemon/mgmt/face-manager.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,7 +26,7 @@
 #ifndef NFD_DAEMON_MGMT_FACE_MANAGER_HPP
 #define NFD_DAEMON_MGMT_FACE_MANAGER_HPP
 
-#include "manager-base.hpp"
+#include "nfd-manager-base.hpp"
 #include <ndn-cxx/management/nfd-face-status.hpp>
 #include <ndn-cxx/management/nfd-face-query-filter.hpp>
 #include "face/face.hpp"
@@ -41,7 +41,7 @@
  * @brief implement the Face Management of NFD Management Protocol.
  * @sa http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt
  */
-class FaceManager : public ManagerBase
+class FaceManager : public NfdManagerBase
 {
 public:
   FaceManager(FaceTable& faceTable,
diff --git a/daemon/mgmt/fib-manager.cpp b/daemon/mgmt/fib-manager.cpp
index 9882033..09e184a 100644
--- a/daemon/mgmt/fib-manager.cpp
+++ b/daemon/mgmt/fib-manager.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -34,7 +34,7 @@
                        function<shared_ptr<Face>(FaceId)> getFace,
                        Dispatcher& dispatcher,
                        CommandValidator& validator)
-  : ManagerBase(dispatcher, validator, "fib")
+  : NfdManagerBase(dispatcher, validator, "fib")
   , m_fib(fib)
   , m_getFace(getFace)
 {
@@ -151,4 +151,4 @@
   }
 }
 
-} // namespace
+} // namespace nfd
diff --git a/daemon/mgmt/fib-manager.hpp b/daemon/mgmt/fib-manager.hpp
index 7c66138..94300cb 100644
--- a/daemon/mgmt/fib-manager.hpp
+++ b/daemon/mgmt/fib-manager.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,7 +26,7 @@
 #ifndef NFD_DAEMON_MGMT_FIB_MANAGER_HPP
 #define NFD_DAEMON_MGMT_FIB_MANAGER_HPP
 
-#include "manager-base.hpp"
+#include "nfd-manager-base.hpp"
 #include "core/logger.hpp"
 #include "table/fib.hpp"
 #include "fw/forwarder.hpp"
@@ -37,7 +37,7 @@
  * @brief implement the FIB Management of NFD Management Protocol.
  * @sa http://redmine.named-data.net/projects/nfd/wiki/FibMgmt
  */
-class FibManager : public ManagerBase
+class FibManager : public NfdManagerBase
 {
 public:
   /**
diff --git a/daemon/mgmt/manager-base.cpp b/daemon/mgmt/manager-base.cpp
deleted file mode 100644
index 418c3d6..0000000
--- a/daemon/mgmt/manager-base.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "manager-base.hpp"
-
-namespace nfd {
-
-using ndn::mgmt::ValidateParameters;
-using ndn::mgmt::Authorization;
-
-ManagerBase::ManagerBase(Dispatcher& dispatcher,
-                         CommandValidator& validator,
-                         const std::string& module)
-  : m_dispatcher(dispatcher)
-  , m_validator(validator)
-  , m_mgmtModuleName(module)
-{
-  m_validator.addSupportedPrivilege(module);
-}
-
-void
-ManagerBase::registerStatusDatasetHandler(const std::string& verb,
-                                          const ndn::mgmt::StatusDatasetHandler& handler)
-{
-  m_dispatcher.addStatusDataset(makeRelPrefix(verb),
-                                ndn::mgmt::makeAcceptAllAuthorization(),
-                                handler);
-}
-
-ndn::mgmt::PostNotification
-ManagerBase::registerNotificationStream(const std::string& verb)
-{
-  return m_dispatcher.addNotificationStream(makeRelPrefix(verb));
-}
-
-void
-ManagerBase::authorize(const Name& prefix, const Interest& interest,
-                       const ndn::mgmt::ControlParameters* params,
-                       ndn::mgmt::AcceptContinuation accept,
-                       ndn::mgmt::RejectContinuation reject)
-{
-  BOOST_ASSERT(params != nullptr);
-  BOOST_ASSERT(typeid(*params) == typeid(ndn::nfd::ControlParameters));
-
-  m_validator.validate(interest,
-                       bind(&ManagerBase::extractRequester, this, interest, accept),
-                       bind([&] { reject(ndn::mgmt::RejectReply::STATUS403); }));
-}
-
-void
-ManagerBase::extractRequester(const Interest& interest,
-                              ndn::mgmt::AcceptContinuation accept)
-{
-  const Name& interestName = interest.getName();
-
-  try {
-    ndn::SignatureInfo sigInfo(interestName.at(ndn::signed_interest::POS_SIG_INFO).blockFromValue());
-    if (!sigInfo.hasKeyLocator() ||
-        sigInfo.getKeyLocator().getType() != ndn::KeyLocator::KeyLocator_Name) {
-      return accept("");
-    }
-
-    accept(sigInfo.getKeyLocator().getName().toUri());
-  }
-  catch (const tlv::Error&) {
-    accept("");
-  }
-}
-
-bool
-ManagerBase::validateParameters(const nfd::ControlCommand& command, const ndn::mgmt::ControlParameters& parameters)
-{
-  BOOST_ASSERT(dynamic_cast<const ControlParameters*>(&parameters) != nullptr);
-
-  try {
-    command.validateRequest(static_cast<const ControlParameters&>(parameters));
-  }
-  catch (const ControlCommand::ArgumentError&) {
-    return false;
-  }
-  return true;
-}
-
-void
-ManagerBase::handleCommand(shared_ptr<nfd::ControlCommand> command,
-                           const ControlCommandHandler& handler,
-                           const Name& prefix, const Interest& interest,
-                           const ndn::mgmt::ControlParameters& params,
-                           ndn::mgmt::CommandContinuation done)
-{
-  BOOST_ASSERT(dynamic_cast<const ControlParameters*>(&params) != nullptr);
-  ControlParameters parameters = static_cast<const ControlParameters&>(params);
-  command->applyDefaultsToRequest(parameters);
-  handler(*command, prefix, interest, parameters, done);
-}
-
-
-} // namespace nfd
diff --git a/daemon/mgmt/manager-base.hpp b/daemon/mgmt/manager-base.hpp
deleted file mode 100644
index 988fff1..0000000
--- a/daemon/mgmt/manager-base.hpp
+++ /dev/null
@@ -1,180 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NFD_DAEMON_MGMT_MANAGER_BASE_HPP
-#define NFD_DAEMON_MGMT_MANAGER_BASE_HPP
-
-#include "common.hpp"
-#include "mgmt/command-validator.hpp"
-
-#include <ndn-cxx/mgmt/dispatcher.hpp>
-#include <ndn-cxx/management/nfd-control-command.hpp>
-#include <ndn-cxx/management/nfd-control-response.hpp>
-#include <ndn-cxx/management/nfd-control-parameters.hpp>
-
-namespace nfd {
-
-using ndn::mgmt::Dispatcher;
-
-using ndn::nfd::ControlCommand;
-using ndn::nfd::ControlResponse;
-using ndn::nfd::ControlParameters;
-
-/**
- * @brief a collection of common functions shared by all NFD managers,
- *        such as communicating with the dispatcher and command validator.
- */
-class ManagerBase : public noncopyable
-{
-public:
-  class Error : public std::runtime_error
-  {
-  public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
-  };
-
-public:
-  ManagerBase(Dispatcher& dispatcher,
-              CommandValidator& validator,
-              const std::string& module);
-
-PUBLIC_WITH_TESTS_ELSE_PROTECTED: // registrations to the dispatcher
-
-  // difference from mgmt::ControlCommand: accepts nfd::ControlParameters
-  typedef function<void(const ControlCommand& command,
-                        const Name& prefix, const Interest& interest,
-                        const ControlParameters& parameters,
-                        const ndn::mgmt::CommandContinuation done)> ControlCommandHandler;
-
-  template<typename Command>
-  void
-  registerCommandHandler(const std::string& verb,
-                         const ControlCommandHandler& handler);
-
-  void
-  registerStatusDatasetHandler(const std::string& verb,
-                               const ndn::mgmt::StatusDatasetHandler& handler);
-
-  ndn::mgmt::PostNotification
-  registerNotificationStream(const std::string& verb);
-
-PUBLIC_WITH_TESTS_ELSE_PRIVATE: // command validation
-  /**
-   * @brief validate a request for ControlCommand.
-   *
-   * This is called by the dispatcher.
-   *
-   * @pre params != null
-   * @pre typeid(*params) == typeid(ndn::nfd::ControlParameters)
-   *
-   * @param prefix the top prefix
-   * @param interest a request for ControlCommand
-   * @param params the parameters for ControlCommand
-   * @param accept callback of successful validation, take the requester string as a argument
-   * @param reject callback of failure in validation, take the action code as a argument
-   */
-  void
-  authorize(const Name& prefix, const Interest& interest,
-            const ndn::mgmt::ControlParameters* params,
-            ndn::mgmt::AcceptContinuation accept,
-            ndn::mgmt::RejectContinuation reject);
-
-  /**
-   * @brief extract a requester from a ControlCommand request
-   *
-   * This is called after the signature is validated.
-   *
-   * @param interest a request for ControlCommand
-   * @param accept callback of successful validation, take the requester string as a argument
-   */
-  void
-  extractRequester(const Interest& interest,
-                   ndn::mgmt::AcceptContinuation accept);
-
-PUBLIC_WITH_TESTS_ELSE_PRIVATE: // helpers
-  /**
-   * @brief validate the @p parameters for a given @p command
-   *
-   * @param parameters the original ControlParameters
-   *
-   * @return whether the original ControlParameters can be validated
-   */
-  static bool
-  validateParameters(const nfd::ControlCommand& command,
-                     const ndn::mgmt::ControlParameters& parameters);
-
-  /** @brief Handle control command
-   */
-  static void
-  handleCommand(shared_ptr<nfd::ControlCommand> command,
-                const ControlCommandHandler& handler,
-                const Name& prefix, const Interest& interest,
-                const ndn::mgmt::ControlParameters& params,
-                ndn::mgmt::CommandContinuation done);
-
-  /**
-   * @brief generate the relative prefix for a handler,
-   *        by appending the verb name to the module name.
-   *
-   * @param verb the verb name
-   *
-   * @return the generated relative prefix
-   */
-  PartialName
-  makeRelPrefix(const std::string& verb);
-
-private:
-  Dispatcher&       m_dispatcher;
-  CommandValidator& m_validator;
-  std::string       m_mgmtModuleName;
-};
-
-inline PartialName
-ManagerBase::makeRelPrefix(const std::string& verb)
-{
-  return PartialName(m_mgmtModuleName).append(verb);
-}
-
-template<typename Command>
-inline void
-ManagerBase::registerCommandHandler(const std::string& verb,
-                                    const ControlCommandHandler& handler)
-{
-  auto command = make_shared<Command>();
-
-  m_dispatcher.addControlCommand<ControlParameters>(
-    makeRelPrefix(verb),
-    bind(&ManagerBase::authorize, this, _1, _2, _3, _4, _5),
-    bind(&ManagerBase::validateParameters, cref(*command), _1),
-    bind(&ManagerBase::handleCommand, command, handler, _1, _2, _3, _4));
-}
-
-} // namespace nfd
-
-#endif // NFD_DAEMON_MGMT_MANAGER_BASE_HPP
diff --git a/daemon/mgmt/nfd-manager-base.cpp b/daemon/mgmt/nfd-manager-base.cpp
new file mode 100644
index 0000000..c0ecaae
--- /dev/null
+++ b/daemon/mgmt/nfd-manager-base.cpp
@@ -0,0 +1,53 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "nfd-manager-base.hpp"
+
+namespace nfd {
+
+NfdManagerBase::NfdManagerBase(Dispatcher& dispatcher,
+                               CommandValidator& validator,
+                               const std::string& module)
+  : ManagerBase(dispatcher, module)
+  , m_validator(validator)
+{
+  m_validator.addSupportedPrivilege(module);
+}
+
+void
+NfdManagerBase::authorize(const Name& prefix, const Interest& interest,
+                          const ndn::mgmt::ControlParameters* params,
+                          ndn::mgmt::AcceptContinuation accept,
+                          ndn::mgmt::RejectContinuation reject)
+{
+  BOOST_ASSERT(params != nullptr);
+  BOOST_ASSERT(typeid(*params) == typeid(ndn::nfd::ControlParameters));
+
+  m_validator.validate(interest,
+                       bind([&interest, this, accept] { extractRequester(interest, accept); }),
+                       bind([reject] { reject(ndn::mgmt::RejectReply::STATUS403); }));
+}
+
+} // namespace nfd
diff --git a/daemon/mgmt/nfd-manager-base.hpp b/daemon/mgmt/nfd-manager-base.hpp
new file mode 100644
index 0000000..4104fbe
--- /dev/null
+++ b/daemon/mgmt/nfd-manager-base.hpp
@@ -0,0 +1,81 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_DAEMON_MGMT_NFD_MANAGER_BASE_HPP
+#define NFD_DAEMON_MGMT_NFD_MANAGER_BASE_HPP
+
+#include "common.hpp"
+#include "command-validator.hpp"
+#include "core/manager-base.hpp"
+
+#include <ndn-cxx/mgmt/dispatcher.hpp>
+#include <ndn-cxx/management/nfd-control-command.hpp>
+#include <ndn-cxx/management/nfd-control-response.hpp>
+#include <ndn-cxx/management/nfd-control-parameters.hpp>
+
+namespace nfd {
+
+using ndn::mgmt::Dispatcher;
+using ndn::nfd::ControlParameters;
+
+/**
+ * @brief a collection of common functions shared by all NFD managers,
+ *        such as communicating with the dispatcher and command validator.
+ */
+class NfdManagerBase : public ManagerBase
+{
+public:
+  NfdManagerBase(Dispatcher& dispatcher,
+                 CommandValidator& validator,
+                 const std::string& module);
+
+PUBLIC_WITH_TESTS_ELSE_PRIVATE: // command validation
+  /**
+   * @brief validate a request for ControlCommand.
+   *
+   * This is called by the dispatcher.
+   *
+   * @pre params != null
+   * @pre typeid(*params) == typeid(ndn::nfd::ControlParameters)
+   *
+   * @param prefix the top prefix
+   * @param interest a request for ControlCommand
+   * @param params the parameters for ControlCommand
+   * @param accept callback of successful validation, take the requester string as a argument
+   * @param reject callback of failure in validation, take the action code as a argument
+   */
+  virtual void
+  authorize(const Name& prefix, const Interest& interest,
+            const ndn::mgmt::ControlParameters* params,
+            ndn::mgmt::AcceptContinuation accept,
+            ndn::mgmt::RejectContinuation reject) DECL_OVERRIDE;
+
+private:
+  CommandValidator& m_validator;
+};
+
+} // namespace nfd
+
+#endif // NFD_DAEMON_MGMT_NFD_MANAGER_BASE_HPP
diff --git a/daemon/mgmt/strategy-choice-manager.cpp b/daemon/mgmt/strategy-choice-manager.cpp
index fba7f4c..a28e237 100644
--- a/daemon/mgmt/strategy-choice-manager.cpp
+++ b/daemon/mgmt/strategy-choice-manager.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -34,7 +34,7 @@
 StrategyChoiceManager::StrategyChoiceManager(StrategyChoice& strategyChoice,
                                              Dispatcher& dispatcher,
                                              CommandValidator& validator)
-  : ManagerBase(dispatcher, validator, "strategy-choice")
+  : NfdManagerBase(dispatcher, validator, "strategy-choice")
   , m_strategyChoice(strategyChoice)
 {
   registerCommandHandler<ndn::nfd::StrategyChoiceSetCommand>("set",
@@ -96,4 +96,4 @@
   context.end();
 }
 
-} // namespace
+} // namespace nfd
diff --git a/daemon/mgmt/strategy-choice-manager.hpp b/daemon/mgmt/strategy-choice-manager.hpp
index 74c54db..eff3418 100644
--- a/daemon/mgmt/strategy-choice-manager.hpp
+++ b/daemon/mgmt/strategy-choice-manager.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,7 +26,7 @@
 #ifndef NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP
 #define NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP
 
-#include "manager-base.hpp"
+#include "nfd-manager-base.hpp"
 
 namespace nfd {
 
@@ -36,7 +36,7 @@
  * @brief implement the Strategy Choice Management of NFD Management Protocol.
  * @sa http://redmine.named-data.net/projects/nfd/wiki/StrategyChoice
  */
-class StrategyChoiceManager : public ManagerBase
+class StrategyChoiceManager : public NfdManagerBase
 {
 public:
   StrategyChoiceManager(StrategyChoice& strategyChoice,
