blob: efac14bce800d2a2539f3d1ac17bb3fc4f40a082 [file] [log] [blame]
// Copyright 2020 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 <utility>
#include "hermes/context.h"
#include <base/check.h>
namespace hermes {
// static
Context* Context::context_ = nullptr;
// static
void Context::Initialize(const scoped_refptr<dbus::Bus>& bus,
lpa::core::Lpa* lpa,
Executor* executor,
AdaptorFactoryInterface* adaptor_factory,
ModemControlInterface* modem_control,
base::FilePath fw_path) {
CHECK(!context_);
context_ = new Context(bus, lpa, executor, adaptor_factory, modem_control,
std::move(fw_path));
}
Context::Context(const scoped_refptr<dbus::Bus>& bus,
lpa::core::Lpa* lpa,
Executor* executor,
AdaptorFactoryInterface* adaptor_factory,
ModemControlInterface* modem_control,
base::FilePath fw_path)
: fw_path_(std::move(fw_path)),
bus_(bus),
lpa_(lpa),
executor_(executor),
adaptor_factory_(adaptor_factory),
modem_control_(modem_control) {}
} // namespace hermes