| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/services/network/network_service_delegate.h" | 5 #include "mojo/services/network/network_service_delegate.h" |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/base_paths.h" | 8 #include "base/base_paths.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // Destroy the NetworkContext now as it requires MessageLoop::current() upon | 33 // Destroy the NetworkContext now as it requires MessageLoop::current() upon |
| 34 // destruction and it is the last moment we know for sure that it is | 34 // destruction and it is the last moment we know for sure that it is |
| 35 // running. | 35 // running. |
| 36 context_.reset(); | 36 context_.reset(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void NetworkServiceDelegate::Create( | 39 void NetworkServiceDelegate::Create( |
| 40 mojo::ApplicationConnection* connection, | 40 mojo::ApplicationConnection* connection, |
| 41 mojo::InterfaceRequest<mojo::NetworkService> request) { | 41 mojo::InterfaceRequest<mojo::NetworkService> request) { |
| 42 mojo::BindToRequest( | 42 mojo::BindToRequest( |
| 43 new mojo::NetworkServiceImpl(connection, context_.get()), &request); | 43 new mojo::NetworkServiceImpl( |
| 44 connection, |
| 45 context_.get(), |
| 46 app_lifetime_helper_.CreateAppRefCount()), |
| 47 &request); |
| 44 } | 48 } |
| OLD | NEW |