Index: components/profile_service/profile_app.h |
diff --git a/components/profile_service/profile_app.h b/components/profile_service/profile_app.h |
index 8da3f56e5c1046634c664989ebaed41297d15731..ed444e5d6112bb375d288309efc7be4651d8b400 100644 |
--- a/components/profile_service/profile_app.h |
+++ b/components/profile_service/profile_app.h |
@@ -5,12 +5,14 @@ |
#ifndef COMPONENTS_PROFILE_SERVICE_PROFILE_APP_H_ |
#define COMPONENTS_PROFILE_SERVICE_PROFILE_APP_H_ |
+#include "base/memory/ref_counted.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" |
#include "mojo/shell/public/cpp/interface_factory.h" |
+#include "mojo/shell/public/cpp/message_loop_ref.h" |
#include "mojo/shell/public/cpp/shell_client.h" |
namespace filesystem { |
@@ -18,18 +20,17 @@ class LockTable; |
} |
namespace profile { |
+class LevelDBThread; |
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; this class will have to be made into a |
+// application which is an InterfaceProvider which internally spawns threads |
+// for different sub-applications. |
class ProfileApp : public mojo::ShellClient, |
public mojo::InterfaceFactory<ProfileService>, |
public mojo::InterfaceFactory<leveldb::LevelDBService> { |
@@ -73,13 +74,13 @@ class ProfileApp : public mojo::ShellClient, |
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_; |
+ scoped_refptr<LevelDBThread> leveldb_thread_; |
+ |
+ mojo::MessageLoopRefFactory ref_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ProfileApp); |
}; |