Chromium Code Reviews| Index: components/leveldb/leveldb_app.h |
| diff --git a/components/leveldb/leveldb_app.h b/components/leveldb/leveldb_app.h |
| index d9877d95b3957e80303bec62efe98f226686c5b4..e830048f8dfb50f7fb022eee399b695578e4a931 100644 |
| --- a/components/leveldb/leveldb_app.h |
| +++ b/components/leveldb/leveldb_app.h |
| @@ -13,6 +13,8 @@ |
| namespace leveldb { |
| +scoped_ptr<mojo::ShellClient> CreateLevelDBApp(); |
| + |
| class LevelDBApp : public mojo::ShellClient, |
|
Ben Goodger (Google)
2016/03/04 20:50:49
Can you explain why the LevelDB functionality is a
Ben Goodger (Google)
2016/03/04 22:13:16
For the curious, Elliot & I discussed this offline
|
| public mojo::InterfaceFactory<LevelDBService> { |
| public: |
| @@ -20,6 +22,10 @@ class LevelDBApp : public mojo::ShellClient, |
| ~LevelDBApp() override; |
| private: |
| + // Tracks connection errors and shuts the application down when all |
| + // outstanding connections to |bindings_| have gone away. |
| + void OnConnectionError(); |
| + |
| // |ShellClient| override: |
| void Initialize(mojo::Connector* connector, |
| const std::string& url, |
| @@ -27,9 +33,6 @@ class LevelDBApp : public mojo::ShellClient, |
| uint32_t user_id) override; |
| bool AcceptConnection(mojo::Connection* connection) override; |
| - // TODO(erg): What do we have to do on shell error? |
| - // bool OnShellConnectionError() override; |
| - |
| // |InterfaceFactory<LevelDBService>| implementation: |
| void Create(mojo::Connection* connection, |
| mojo::InterfaceRequest<LevelDBService> request) override; |
| @@ -38,6 +41,8 @@ class LevelDBApp : public mojo::ShellClient, |
| scoped_ptr<LevelDBService> service_; |
| mojo::BindingSet<LevelDBService> bindings_; |
| + int outstanding_bindings_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(LevelDBApp); |
| }; |