Index: mojo/services/network/url_loader_factory_impl.cc |
diff --git a/mojo/services/network/url_loader_factory_impl.cc b/mojo/services/network/url_loader_factory_impl.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ff0ed19ca489a7da3a72c4c32dc17f20e40f17e7 |
--- /dev/null |
+++ b/mojo/services/network/url_loader_factory_impl.cc |
@@ -0,0 +1,40 @@ |
+// Copyright 2014 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 "mojo/services/network/url_loader_factory_impl.h" |
+ |
+#include "mojo/application/public/cpp/application_connection.h" |
+#include "mojo/services/network/cookie_store_impl.h" |
+#include "mojo/services/network/http_server_impl.h" |
+#include "mojo/services/network/net_adapters.h" |
+#include "mojo/services/network/tcp_bound_socket_impl.h" |
+#include "mojo/services/network/udp_socket_impl.h" |
+#include "mojo/services/network/url_loader_impl.h" |
+#include "mojo/services/network/web_socket_impl.h" |
jam
2015/06/04 16:12:46
nit: don't need all these headers.
also 2015
|
+ |
+namespace mojo { |
+ |
+URLLoaderFactoryImpl::URLLoaderFactoryImpl( |
+ ApplicationConnection* connection, |
+ NetworkContext* context, |
+ scoped_ptr<mojo::AppRefCount> app_refcount, |
+ InterfaceRequest<URLLoaderFactory> request) |
+ : context_(context), |
+ app_refcount_(app_refcount.Pass()), |
+ binding_(this, request.Pass()) { |
+} |
+ |
+URLLoaderFactoryImpl::~URLLoaderFactoryImpl() { |
+} |
+ |
+void URLLoaderFactoryImpl::CreateURLLoader(InterfaceRequest<URLLoader> loader) { |
+ // TODO(darin): Plumb origin. Use for CORS. |
+ // TODO(beng): Figure out how to get origin through to here. |
+ // The loader will delete itself when the pipe is closed, unless a request is |
+ // in progress. In which case, the loader will delete itself when the request |
+ // is finished. |
+ new URLLoaderImpl(context_, loader.Pass(), app_refcount_->Clone()); |
+} |
+ |
+} // namespace mojo |