Index: components/profile_service/profile_service_impl.h |
diff --git a/components/profile_service/profile_service_impl.h b/components/profile_service/profile_service_impl.h |
index 72f7ce8c6fc24004a31adbdf275bc52d0587af8f..42b661bac9f2cd2d735d69af4f356f8230782ecd 100644 |
--- a/components/profile_service/profile_service_impl.h |
+++ b/components/profile_service/profile_service_impl.h |
@@ -5,6 +5,7 @@ |
#ifndef COMPONENTS_PROFILE_SERVICE_PROFILE_SERVICE_IMPL_H_ |
#define COMPONENTS_PROFILE_SERVICE_PROFILE_SERVICE_IMPL_H_ |
+#include "base/bind.h" |
#include "base/files/file_path.h" |
#include "components/filesystem/public/interfaces/directory.mojom.h" |
#include "components/profile_service/public/interfaces/profile.mojom.h" |
@@ -16,6 +17,10 @@ namespace filesystem { |
class LockTable; |
} |
+namespace mojo { |
+class MessageLoopRef; |
+} |
+ |
namespace profile { |
// A service which serves directories to callers. |
@@ -23,16 +28,22 @@ class ProfileServiceImpl : public ProfileService { |
public: |
ProfileServiceImpl(mojo::Connection* connection, |
mojo::InterfaceRequest<ProfileService> request, |
+ scoped_ptr<mojo::MessageLoopRef> ref, |
base::FilePath base_profile_dir, |
filesystem::LockTable* lock_table); |
~ProfileServiceImpl() override; |
// Overridden from ProfileService: |
void GetDirectory( |
- mojo::InterfaceRequest<filesystem::Directory> request) override; |
+ mojo::InterfaceRequest<filesystem::Directory> request, |
+ const GetDirectoryCallback& callback) override; |
private: |
+ // Causes our application to quit when we go out of scope. |
+ scoped_ptr<mojo::MessageLoopRef> message_loop_ref_; |
+ |
mojo::StrongBinding<ProfileService> binding_; |
+ base::Closure on_service_destroyed_; |
filesystem::LockTable* lock_table_; |
base::FilePath path_; |