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 24 matching lines...) Expand all Loading... |
35 namespace { | 35 namespace { |
36 | 36 |
37 const char kUserDataDir[] = "user-data-dir"; | 37 const char kUserDataDir[] = "user-data-dir"; |
38 | 38 |
39 } // namespace filesystem | 39 } // namespace filesystem |
40 | 40 |
41 FileSystemApp::FileSystemApp() : lock_table_(new LockTable) {} | 41 FileSystemApp::FileSystemApp() : lock_table_(new LockTable) {} |
42 | 42 |
43 FileSystemApp::~FileSystemApp() {} | 43 FileSystemApp::~FileSystemApp() {} |
44 | 44 |
45 void FileSystemApp::OnStart(service_manager::ServiceContext* context) { | 45 void FileSystemApp::OnStart() { |
46 tracing_.Initialize(context->connector(), context->identity().name()); | 46 tracing_.Initialize(context()->connector(), context()->identity().name()); |
47 } | 47 } |
48 | 48 |
49 bool FileSystemApp::OnConnect(const service_manager::ServiceInfo& remote_info, | 49 bool FileSystemApp::OnConnect(const service_manager::ServiceInfo& remote_info, |
50 service_manager::InterfaceRegistry* registry) { | 50 service_manager::InterfaceRegistry* registry) { |
51 registry->AddInterface<mojom::FileSystem>(this); | 51 registry->AddInterface<mojom::FileSystem>(this); |
52 return true; | 52 return true; |
53 } | 53 } |
54 | 54 |
55 // |InterfaceFactory<Files>| implementation: | 55 // |InterfaceFactory<Files>| implementation: |
56 void FileSystemApp::Create(const service_manager::Identity& remote_identity, | 56 void FileSystemApp::Create(const service_manager::Identity& remote_identity, |
(...skipping 28 matching lines...) Expand all Loading... |
85 path = path.Append(FILE_PATH_LITERAL("filesystem")); | 85 path = path.Append(FILE_PATH_LITERAL("filesystem")); |
86 } | 86 } |
87 | 87 |
88 if (!base::PathExists(path)) | 88 if (!base::PathExists(path)) |
89 base::CreateDirectory(path); | 89 base::CreateDirectory(path); |
90 | 90 |
91 return path; | 91 return path; |
92 } | 92 } |
93 | 93 |
94 } // namespace filesystem | 94 } // namespace filesystem |
OLD | NEW |