blob: d18ec9260a0b8d8276a7de63f5c137e98c8073c5 [file] [log] [blame]
// Copyright 2015 The Chromium 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 "garnet/bin/http/http_service_delegate.h"
namespace http {
namespace oldhttp = ::fuchsia::net::oldhttp;
HttpServiceDelegate::HttpServiceDelegate(async_dispatcher_t* dispatcher)
: context_(sys::ComponentContext::CreateAndServeOutgoingDirectory()),
http_provider_(dispatcher) {
FXL_DCHECK(dispatcher), context_->outgoing()->AddPublicService<oldhttp::HttpService>(
[this](fidl::InterfaceRequest<oldhttp::HttpService> request) {
http_provider_.AddBinding(std::move(request));
});
}
HttpServiceDelegate::~HttpServiceDelegate() {}
} // namespace http