Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: mojo/services/network/url_loader_factory_impl.cc

Issue 1161463004: Move URL Loader creation to a separate factory object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698