Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "mojo/services/network/url_loader_factory_impl.h" | |
| 6 | |
| 7 #include "mojo/application/public/cpp/application_connection.h" | |
| 8 #include "mojo/services/network/cookie_store_impl.h" | |
| 9 #include "mojo/services/network/http_server_impl.h" | |
| 10 #include "mojo/services/network/net_adapters.h" | |
| 11 #include "mojo/services/network/tcp_bound_socket_impl.h" | |
| 12 #include "mojo/services/network/udp_socket_impl.h" | |
| 13 #include "mojo/services/network/url_loader_impl.h" | |
| 14 #include "mojo/services/network/web_socket_impl.h" | |
|
jam
2015/06/04 16:12:46
nit: don't need all these headers.
also 2015
| |
| 15 | |
| 16 namespace mojo { | |
| 17 | |
| 18 URLLoaderFactoryImpl::URLLoaderFactoryImpl( | |
| 19 ApplicationConnection* connection, | |
| 20 NetworkContext* context, | |
| 21 scoped_ptr<mojo::AppRefCount> app_refcount, | |
| 22 InterfaceRequest<URLLoaderFactory> request) | |
| 23 : context_(context), | |
| 24 app_refcount_(app_refcount.Pass()), | |
| 25 binding_(this, request.Pass()) { | |
| 26 } | |
| 27 | |
| 28 URLLoaderFactoryImpl::~URLLoaderFactoryImpl() { | |
| 29 } | |
| 30 | |
| 31 void URLLoaderFactoryImpl::CreateURLLoader(InterfaceRequest<URLLoader> loader) { | |
| 32 // TODO(darin): Plumb origin. Use for CORS. | |
| 33 // TODO(beng): Figure out how to get origin through to here. | |
| 34 // The loader will delete itself when the pipe is closed, unless a request is | |
| 35 // in progress. In which case, the loader will delete itself when the request | |
| 36 // is finished. | |
| 37 new URLLoaderImpl(context_, loader.Pass(), app_refcount_->Clone()); | |
| 38 } | |
| 39 | |
| 40 } // namespace mojo | |
| OLD | NEW |