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 25 matching lines...) Expand all Loading... |
36 const char kUserDataDir[] = "user-data-dir"; | 36 const char kUserDataDir[] = "user-data-dir"; |
37 | 37 |
38 } // namespace filesystem | 38 } // namespace filesystem |
39 | 39 |
40 FileSystemApp::FileSystemApp() : lock_table_(new LockTable) { | 40 FileSystemApp::FileSystemApp() : lock_table_(new LockTable) { |
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()); | |
48 } | |
49 | 47 |
50 void FileSystemApp::OnBindInterface( | 48 void FileSystemApp::OnBindInterface( |
51 const service_manager::ServiceInfo& source_info, | 49 const service_manager::ServiceInfo& source_info, |
52 const std::string& interface_name, | 50 const std::string& interface_name, |
53 mojo::ScopedMessagePipeHandle interface_pipe) { | 51 mojo::ScopedMessagePipeHandle interface_pipe) { |
54 registry_.BindInterface(source_info.identity, interface_name, | 52 registry_.BindInterface(source_info.identity, interface_name, |
55 std::move(interface_pipe)); | 53 std::move(interface_pipe)); |
56 } | 54 } |
57 | 55 |
58 // |InterfaceFactory<Files>| implementation: | 56 // |InterfaceFactory<Files>| implementation: |
(...skipping 29 matching lines...) Expand all Loading... |
88 path = path.Append(FILE_PATH_LITERAL("filesystem")); | 86 path = path.Append(FILE_PATH_LITERAL("filesystem")); |
89 } | 87 } |
90 | 88 |
91 if (!base::PathExists(path)) | 89 if (!base::PathExists(path)) |
92 base::CreateDirectory(path); | 90 base::CreateDirectory(path); |
93 | 91 |
94 return path; | 92 return path; |
95 } | 93 } |
96 | 94 |
97 } // namespace filesystem | 95 } // namespace filesystem |
OLD | NEW |