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

Side by Side Diff: components/filesystem/file_system_app.cc

Issue 2850743004: Replace ServiceInfo with BindSourceInfo. (Closed)
Patch Set: . Created 3 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
« no previous file with comments | « components/filesystem/file_system_app.h ('k') | components/font_service/font_service_app.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/filesystem/file_system_app.h" 5 #include "components/filesystem/file_system_app.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 30 matching lines...) Expand all
41 registry_.AddInterface<mojom::FileSystem>(this); 41 registry_.AddInterface<mojom::FileSystem>(this);
42 } 42 }
43 43
44 FileSystemApp::~FileSystemApp() {} 44 FileSystemApp::~FileSystemApp() {}
45 45
46 void FileSystemApp::OnStart() { 46 void FileSystemApp::OnStart() {
47 tracing_.Initialize(context()->connector(), context()->identity().name()); 47 tracing_.Initialize(context()->connector(), context()->identity().name());
48 } 48 }
49 49
50 void FileSystemApp::OnBindInterface( 50 void FileSystemApp::OnBindInterface(
51 const service_manager::ServiceInfo& source_info, 51 const service_manager::BindSourceInfo& source_info,
52 const std::string& interface_name, 52 const std::string& interface_name,
53 mojo::ScopedMessagePipeHandle interface_pipe) { 53 mojo::ScopedMessagePipeHandle interface_pipe) {
54 registry_.BindInterface(source_info.identity, interface_name, 54 registry_.BindInterface(source_info.identity, interface_name,
55 std::move(interface_pipe)); 55 std::move(interface_pipe));
56 } 56 }
57 57
58 // |InterfaceFactory<Files>| implementation: 58 // |InterfaceFactory<Files>| implementation:
59 void FileSystemApp::Create(const service_manager::Identity& remote_identity, 59 void FileSystemApp::Create(const service_manager::Identity& remote_identity,
60 mojom::FileSystemRequest request) { 60 mojom::FileSystemRequest request) {
61 mojo::MakeStrongBinding(base::MakeUnique<FileSystemImpl>( 61 mojo::MakeStrongBinding(base::MakeUnique<FileSystemImpl>(
(...skipping 26 matching lines...) Expand all
88 path = path.Append(FILE_PATH_LITERAL("filesystem")); 88 path = path.Append(FILE_PATH_LITERAL("filesystem"));
89 } 89 }
90 90
91 if (!base::PathExists(path)) 91 if (!base::PathExists(path))
92 base::CreateDirectory(path); 92 base::CreateDirectory(path);
93 93
94 return path; 94 return path;
95 } 95 }
96 96
97 } // namespace filesystem 97 } // namespace filesystem
OLDNEW
« no previous file with comments | « components/filesystem/file_system_app.h ('k') | components/font_service/font_service_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698