blob: 45932280d5e7b7eca4f8a4736294e78d9df362ad [file] [log] [blame]
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "shill/net/io_handler_factory_container.h"
#include <base/logging.h>
namespace shill {
IOHandlerFactoryContainer::IOHandlerFactoryContainer()
: factory_(new IOHandlerFactory()) {}
IOHandlerFactoryContainer::~IOHandlerFactoryContainer() {}
IOHandlerFactoryContainer* IOHandlerFactoryContainer::GetInstance() {
static base::NoDestructor<IOHandlerFactoryContainer> instance;
return instance.get();
}
void IOHandlerFactoryContainer::SetIOHandlerFactory(IOHandlerFactory* factory) {
CHECK(factory);
factory_.reset(factory);
}
IOHandlerFactory* IOHandlerFactoryContainer::GetIOHandlerFactory() {
return factory_.get();
}
} // namespace shill