| 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 #ifndef COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ | 5 #ifndef COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ |
| 6 #define COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ | 6 #define COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/filesystem/directory_impl.h" | 9 #include "components/filesystem/directory_impl.h" |
| 10 #include "components/filesystem/file_system_impl.h" | 10 #include "components/filesystem/file_system_impl.h" |
| 11 #include "components/filesystem/lock_table.h" | 11 #include "components/filesystem/lock_table.h" |
| 12 #include "components/filesystem/public/interfaces/file_system.mojom.h" | 12 #include "components/filesystem/public/interfaces/file_system.mojom.h" |
| 13 #include "services/service_manager/public/cpp/interface_factory.h" | 13 #include "services/service_manager/public/cpp/interface_factory.h" |
| 14 #include "services/service_manager/public/cpp/service.h" | 14 #include "services/service_manager/public/cpp/service.h" |
| 15 #include "services/tracing/public/cpp/provider.h" | 15 #include "services/tracing/public/cpp/provider.h" |
| 16 | 16 |
| 17 namespace mojo { | 17 namespace mojo { |
| 18 class Connector; | 18 class Connector; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace filesystem { | 21 namespace filesystem { |
| 22 | 22 |
| 23 class FileSystemApp : public shell::Service, | 23 class FileSystemApp |
| 24 public shell::InterfaceFactory<mojom::FileSystem> { | 24 : public service_manager::Service, |
| 25 public service_manager::InterfaceFactory<mojom::FileSystem> { |
| 25 public: | 26 public: |
| 26 FileSystemApp(); | 27 FileSystemApp(); |
| 27 ~FileSystemApp() override; | 28 ~FileSystemApp() override; |
| 28 | 29 |
| 29 private: | 30 private: |
| 30 // Gets the system specific toplevel profile directory. | 31 // Gets the system specific toplevel profile directory. |
| 31 static base::FilePath GetUserDataDir(); | 32 static base::FilePath GetUserDataDir(); |
| 32 | 33 |
| 33 // |shell::Service| override: | 34 // |service_manager::Service| override: |
| 34 void OnStart(const shell::Identity& identity) override; | 35 void OnStart(const service_manager::Identity& identity) override; |
| 35 bool OnConnect(const shell::Identity& remote_identity, | 36 bool OnConnect(const service_manager::Identity& remote_identity, |
| 36 shell::InterfaceRegistry* registry) override; | 37 service_manager::InterfaceRegistry* registry) override; |
| 37 | 38 |
| 38 // |InterfaceFactory<Files>| implementation: | 39 // |InterfaceFactory<Files>| implementation: |
| 39 void Create(const shell::Identity& remote_identity, | 40 void Create(const service_manager::Identity& remote_identity, |
| 40 mojo::InterfaceRequest<mojom::FileSystem> request) override; | 41 mojo::InterfaceRequest<mojom::FileSystem> request) override; |
| 41 | 42 |
| 42 tracing::Provider tracing_; | 43 tracing::Provider tracing_; |
| 43 | 44 |
| 44 scoped_refptr<LockTable> lock_table_; | 45 scoped_refptr<LockTable> lock_table_; |
| 45 | 46 |
| 46 DISALLOW_COPY_AND_ASSIGN(FileSystemApp); | 47 DISALLOW_COPY_AND_ASSIGN(FileSystemApp); |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 } // namespace filesystem | 50 } // namespace filesystem |
| 50 | 51 |
| 51 #endif // COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ | 52 #endif // COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ |
| OLD | NEW |