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 21 matching lines...) Expand all Loading... |
32 namespace { | 32 namespace { |
33 | 33 |
34 const char kUserDataDir[] = "user-data-dir"; | 34 const char kUserDataDir[] = "user-data-dir"; |
35 | 35 |
36 } // namespace filesystem | 36 } // namespace filesystem |
37 | 37 |
38 FileSystemApp::FileSystemApp() : lock_table_(new LockTable) {} | 38 FileSystemApp::FileSystemApp() : lock_table_(new LockTable) {} |
39 | 39 |
40 FileSystemApp::~FileSystemApp() {} | 40 FileSystemApp::~FileSystemApp() {} |
41 | 41 |
42 void FileSystemApp::OnStart(shell::Connector* connector, | 42 void FileSystemApp::OnStart(const shell::Identity& identity) { |
43 const shell::Identity& identity, | 43 tracing_.Initialize(connector(), identity.name()); |
44 uint32_t id) { | |
45 tracing_.Initialize(connector, identity.name()); | |
46 } | 44 } |
47 | 45 |
48 bool FileSystemApp::OnConnect(shell::Connection* connection) { | 46 bool FileSystemApp::OnConnect(shell::Connection* connection) { |
49 connection->AddInterface<mojom::FileSystem>(this); | 47 connection->AddInterface<mojom::FileSystem>(this); |
50 return true; | 48 return true; |
51 } | 49 } |
52 | 50 |
53 // |InterfaceFactory<Files>| implementation: | 51 // |InterfaceFactory<Files>| implementation: |
54 void FileSystemApp::Create(const shell::Identity& remote_identity, | 52 void FileSystemApp::Create(const shell::Identity& remote_identity, |
55 mojo::InterfaceRequest<mojom::FileSystem> request) { | 53 mojo::InterfaceRequest<mojom::FileSystem> request) { |
(...skipping 26 matching lines...) Expand all Loading... |
82 path = path.Append(FILE_PATH_LITERAL("filesystem")); | 80 path = path.Append(FILE_PATH_LITERAL("filesystem")); |
83 } | 81 } |
84 | 82 |
85 if (!base::PathExists(path)) | 83 if (!base::PathExists(path)) |
86 base::CreateDirectory(path); | 84 base::CreateDirectory(path); |
87 | 85 |
88 return path; | 86 return path; |
89 } | 87 } |
90 | 88 |
91 } // namespace filesystem | 89 } // namespace filesystem |
OLD | NEW |