summaryrefslogtreecommitdiff
path: root/chromium/fuchsia/http/http_service_impl.cc
blob: 9d3e7dcfafe21d2eda1d579e943112d496ac34ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2018 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 "fuchsia/http/http_service_impl.h"

#include "fuchsia/http/url_loader_impl.h"
#include "net/url_request/url_request_context_builder.h"

HttpServiceImpl::HttpServiceImpl() {
  // TODO: Set the right options in the URLRequestContextBuilder.
}

HttpServiceImpl::~HttpServiceImpl() = default;

void HttpServiceImpl::CreateURLLoader(
    fidl::InterfaceRequest<fuchsia::net::oldhttp::URLLoader> request) {
  // The URLLoaderImpl objects lifespan is tied to their binding, which is set
  // in their constructor.
  net::URLRequestContextBuilder builder;
  new URLLoaderImpl(builder.Build(), std::move(request));
}