Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: components/leveldb/leveldb_app.h

Issue 1737933002: mojo leveldb: Get profile and leveldb connected to DOMStorageContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keeping up with the ToT Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698