| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_USER_USER_SHELL_CLIENT_H_ | 5 #ifndef SERVICES_USER_USER_SHELL_CLIENT_H_ |
| 6 #define SERVICES_USER_USER_SHELL_CLIENT_H_ | 6 #define SERVICES_USER_USER_SHELL_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "components/filesystem/lock_table.h" | 9 #include "components/filesystem/lock_table.h" |
| 10 #include "components/leveldb/public/interfaces/leveldb.mojom.h" | 10 #include "components/leveldb/public/interfaces/leveldb.mojom.h" |
| 11 #include "mojo/public/cpp/bindings/binding_set.h" | 11 #include "mojo/public/cpp/bindings/binding_set.h" |
| 12 #include "services/shell/public/cpp/interface_factory.h" | 12 #include "services/shell/public/cpp/interface_factory.h" |
| 13 #include "services/shell/public/cpp/shell_client.h" | 13 #include "services/shell/public/cpp/shell_client.h" |
| 14 #include "services/tracing/public/cpp/tracing_impl.h" | 14 #include "services/tracing/public/cpp/tracing_impl.h" |
| 15 #include "services/user/public/interfaces/user_service.mojom.h" | 15 #include "services/user/public/interfaces/user_service.mojom.h" |
| 16 | 16 |
| 17 namespace user_service { | 17 namespace user_service { |
| 18 | 18 |
| 19 scoped_ptr<shell::ShellClient> CreateUserShellClient( | 19 std::unique_ptr<shell::ShellClient> CreateUserShellClient( |
| 20 scoped_refptr<base::SingleThreadTaskRunner> user_service_runner, | 20 scoped_refptr<base::SingleThreadTaskRunner> user_service_runner, |
| 21 scoped_refptr<base::SingleThreadTaskRunner> leveldb_service_runner); | 21 scoped_refptr<base::SingleThreadTaskRunner> leveldb_service_runner); |
| 22 | 22 |
| 23 class UserShellClient | 23 class UserShellClient |
| 24 : public shell::ShellClient, | 24 : public shell::ShellClient, |
| 25 public shell::InterfaceFactory<mojom::UserService>, | 25 public shell::InterfaceFactory<mojom::UserService>, |
| 26 public shell::InterfaceFactory<leveldb::LevelDBService> { | 26 public shell::InterfaceFactory<leveldb::LevelDBService> { |
| 27 public: | 27 public: |
| 28 UserShellClient( | 28 UserShellClient( |
| 29 scoped_refptr<base::SingleThreadTaskRunner> user_service_runner, | 29 scoped_refptr<base::SingleThreadTaskRunner> user_service_runner, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 50 void OnLevelDBServiceError(); | 50 void OnLevelDBServiceError(); |
| 51 | 51 |
| 52 scoped_refptr<base::SingleThreadTaskRunner> user_service_runner_; | 52 scoped_refptr<base::SingleThreadTaskRunner> user_service_runner_; |
| 53 scoped_refptr<base::SingleThreadTaskRunner> leveldb_service_runner_; | 53 scoped_refptr<base::SingleThreadTaskRunner> leveldb_service_runner_; |
| 54 | 54 |
| 55 mojo::TracingImpl tracing_; | 55 mojo::TracingImpl tracing_; |
| 56 | 56 |
| 57 // We create these two objects so we can delete them on the correct task | 57 // We create these two objects so we can delete them on the correct task |
| 58 // runners. | 58 // runners. |
| 59 class UserServiceObjects; | 59 class UserServiceObjects; |
| 60 scoped_ptr<UserServiceObjects> user_objects_; | 60 std::unique_ptr<UserServiceObjects> user_objects_; |
| 61 | 61 |
| 62 class LevelDBServiceObjects; | 62 class LevelDBServiceObjects; |
| 63 scoped_ptr<LevelDBServiceObjects> leveldb_objects_; | 63 std::unique_ptr<LevelDBServiceObjects> leveldb_objects_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(UserShellClient); | 65 DISALLOW_COPY_AND_ASSIGN(UserShellClient); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace user_service | 68 } // namespace user_service |
| 69 | 69 |
| 70 #endif // SERVICES_USER_USER_SHELL_CLIENT_H_ | 70 #endif // SERVICES_USER_USER_SHELL_CLIENT_H_ |
| OLD | NEW |