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

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

Issue 1139123006: Fork the mojo shell interfaces used by Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 years, 7 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
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"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "third_party/mojo/src/mojo/public/cpp/application/application_connectio n.h" 12 #include "mojo/application/public/cpp/application_connection.h"
13 13
14 NetworkServiceDelegate::NetworkServiceDelegate() {} 14 NetworkServiceDelegate::NetworkServiceDelegate() {}
15 15
16 NetworkServiceDelegate::~NetworkServiceDelegate() {} 16 NetworkServiceDelegate::~NetworkServiceDelegate() {}
17 17
18 void NetworkServiceDelegate::Initialize(mojo::ApplicationImpl* app) { 18 void NetworkServiceDelegate::Initialize(mojo::ApplicationImpl* app) {
19 base::FilePath base_path; 19 base::FilePath base_path;
20 CHECK(PathService::Get(base::DIR_TEMP, &base_path)); 20 CHECK(PathService::Get(base::DIR_TEMP, &base_path));
21 base_path = base_path.Append(FILE_PATH_LITERAL("network_service")); 21 base_path = base_path.Append(FILE_PATH_LITERAL("network_service"));
22 context_.reset(new mojo::NetworkContext(base_path)); 22 context_.reset(new mojo::NetworkContext(base_path));
(...skipping 12 matching lines...) Expand all
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(connection, context_.get()), &request);
44 } 44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698