Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / mojo / services / network / network_service_impl.cc
blob641e36a8b9eae433fb860239f13bda4bf7161aec
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.
5 #include "mojo/services/network/network_service_impl.h"
7 #include "mojo/public/cpp/application/application_connection.h"
8 #include "mojo/services/network/cookie_store_impl.h"
9 #include "mojo/services/network/url_loader_impl.h"
11 namespace mojo {
13 NetworkServiceImpl::NetworkServiceImpl(ApplicationConnection* connection,
14 NetworkContext* context)
15 : context_(context),
16 origin_(GURL(connection->GetRemoteApplicationURL()).GetOrigin()) {
19 NetworkServiceImpl::~NetworkServiceImpl() {
22 void NetworkServiceImpl::CreateURLLoader(InterfaceRequest<URLLoader> loader) {
23 // TODO(darin): Plumb origin_. Use for CORS.
24 BindToRequest(new URLLoaderImpl(context_), &loader);
27 void NetworkServiceImpl::GetCookieStore(InterfaceRequest<CookieStore> store) {
28 BindToRequest(new CookieStoreImpl(context_, origin_), &store);
31 } // namespace mojo