Update broken references to image assets
[chromium-blink-merge.git] / mojo / services / network / url_loader_factory_impl.cc
blob5d2df32e6621b0b7e7928b1cc97a27772d4a140d
1 // Copyright 2015 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.
5 #include "mojo/services/network/url_loader_factory_impl.h"
7 #include "mojo/services/network/url_loader_impl.h"
9 namespace mojo {
11 URLLoaderFactoryImpl::URLLoaderFactoryImpl(
12 NetworkContext* context,
13 scoped_ptr<mojo::AppRefCount> app_refcount,
14 InterfaceRequest<URLLoaderFactory> request)
15 : context_(context),
16 app_refcount_(app_refcount.Pass()),
17 binding_(this, request.Pass()) {
20 URLLoaderFactoryImpl::~URLLoaderFactoryImpl() {
23 void URLLoaderFactoryImpl::CreateURLLoader(InterfaceRequest<URLLoader> loader) {
24 // TODO(darin): Plumb origin. Use for CORS.
25 // TODO(beng): Figure out how to get origin through to here.
26 // The loader will delete itself when the pipe is closed, unless a request is
27 // in progress. In which case, the loader will delete itself when the request
28 // is finished.
29 new URLLoaderImpl(context_, loader.Pass(), app_refcount_->Clone());
32 } // namespace mojo