| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |