Chromium Code Reviews| Index: components/profile_service/profile_app.h |
| diff --git a/components/profile_service/profile_app.h b/components/profile_service/profile_app.h |
| index 80c0130d5d4a4a6ea7048ff149dc8a7b2948fde4..8934f72c5b00b3a98745b9433f4b72283a947640 100644 |
| --- a/components/profile_service/profile_app.h |
| +++ b/components/profile_service/profile_app.h |
| @@ -6,7 +6,6 @@ |
| #define COMPONENTS_PROFILE_SERVICE_PROFILE_APP_H_ |
| #include "components/filesystem/lock_table.h" |
| -#include "components/leveldb/public/interfaces/leveldb.mojom.h" |
| #include "components/profile_service/public/interfaces/profile.mojom.h" |
| #include "mojo/public/cpp/bindings/binding_set.h" |
| #include "mojo/services/tracing/public/cpp/tracing_impl.h" |
| @@ -23,16 +22,14 @@ scoped_ptr<mojo::ShellClient> CreateProfileApp(); |
| // Application which hands off per-profile services. |
| // |
| -// This Application serves ProfileService, and serves LevelDBService since most |
| -// of the users of leveldb will want to write directly to the Directory |
| -// provided by the ProfileService; we want file handling to be done in the same |
| -// process to minimize IPC. |
| -// |
| -// In the future, this application will probably also offer any service that |
| -// most Profile using applications will need, such as preferences. |
| +// This Application serves ProfileService. In the future, this application will |
| +// probably also offer any service that most Profile using applications will |
| +// need, such as preferences, but these will need to be served off of separate |
| +// threads; this class will have to be made into a application which is an |
| +// InterfaceProvider which internally spawns threads for different |
| +// sub-applications. |
|
Ben Goodger (Google)
2016/03/04 20:50:49
what's the reason for needing to provide interface
Elliot Glaysher
2016/03/10 21:00:35
[Discussed in person; leaving the comment here for
|
| class ProfileApp : public mojo::ShellClient, |
| - public mojo::InterfaceFactory<ProfileService>, |
| - public mojo::InterfaceFactory<leveldb::LevelDBService> { |
| + public mojo::InterfaceFactory<ProfileService> { |
| public: |
| ProfileApp(); |
| ~ProfileApp() override; |
| @@ -54,6 +51,8 @@ class ProfileApp : public mojo::ShellClient, |
| const base::FilePath& profile_data_dir); |
| private: |
| + void OnProfileServiceDestroyed(); |
| + |
| // |ShellClient| override: |
| void Initialize(mojo::Connector* connector, |
| const std::string& url, |
| @@ -65,22 +64,17 @@ class ProfileApp : public mojo::ShellClient, |
| void Create(mojo::Connection* connection, |
| mojo::InterfaceRequest<ProfileService> request) override; |
| - // |InterfaceFactory<LevelDBService>| implementation: |
| - void Create(mojo::Connection* connection, |
| - mojo::InterfaceRequest<leveldb::LevelDBService> request) override; |
| - |
| mojo::TracingImpl tracing_; |
| scoped_ptr<ProfileService> profile_service_; |
| mojo::BindingSet<ProfileService> profile_bindings_; |
| - scoped_ptr<leveldb::LevelDBService> leveldb_service_; |
| - mojo::BindingSet<leveldb::LevelDBService> leveldb_bindings_; |
| - |
| scoped_ptr<filesystem::LockTable> lock_table_; |
| base::FilePath profile_data_dir_; |
| + int profiles_outstanding_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ProfileApp); |
| }; |