| Index: components/leveldb/leveldb_service_impl.cc
|
| diff --git a/components/leveldb/leveldb_app.cc b/components/leveldb/leveldb_service_impl.cc
|
| similarity index 64%
|
| copy from components/leveldb/leveldb_app.cc
|
| copy to components/leveldb/leveldb_service_impl.cc
|
| index bd8ac71905cca813b8641930506223676f39b7d4..404019e9992ffa0050dd3a5cae7c81c1c64afa7a 100644
|
| --- a/components/leveldb/leveldb_app.cc
|
| +++ b/components/leveldb/leveldb_service_impl.cc
|
| @@ -2,12 +2,11 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "components/leveldb/leveldb_app.h"
|
| +#include "components/leveldb/leveldb_service_impl.h"
|
|
|
| #include "components/leveldb/env_mojo.h"
|
| #include "components/leveldb/leveldb_database_impl.h"
|
| #include "components/leveldb/util.h"
|
| -#include "mojo/shell/public/cpp/connection.h"
|
| #include "third_party/leveldatabase/env_chromium.h"
|
| #include "third_party/leveldatabase/src/include/leveldb/db.h"
|
| #include "third_party/leveldatabase/src/include/leveldb/env.h"
|
| @@ -16,31 +15,16 @@
|
|
|
| namespace leveldb {
|
|
|
| -LevelDBApp::LevelDBApp() {}
|
| -
|
| -LevelDBApp::~LevelDBApp() {}
|
| -
|
| -void LevelDBApp::Initialize(mojo::Shell* shell,
|
| - const std::string& url,
|
| - uint32_t id) {
|
| - tracing_.Initialize(shell, url);
|
| - thread_ = new LevelDBFileThread;
|
| +LevelDBServiceImpl::LevelDBServiceImpl()
|
| + : thread_(new LevelDBFileThread) {
|
| }
|
|
|
| -bool LevelDBApp::AcceptConnection(mojo::Connection* connection) {
|
| - connection->AddInterface<LevelDBService>(this);
|
| - return true;
|
| -}
|
| -
|
| -void LevelDBApp::Create(mojo::Connection* connection,
|
| - mojo::InterfaceRequest<LevelDBService> request) {
|
| - bindings_.AddBinding(this, std::move(request));
|
| -}
|
| +LevelDBServiceImpl::~LevelDBServiceImpl() {}
|
|
|
| -void LevelDBApp::Open(filesystem::DirectoryPtr directory,
|
| - const mojo::String& dbname,
|
| - mojo::InterfaceRequest<LevelDBDatabase> database,
|
| - const OpenCallback& callback) {
|
| +void LevelDBServiceImpl::Open(filesystem::DirectoryPtr directory,
|
| + const mojo::String& dbname,
|
| + mojo::InterfaceRequest<LevelDBDatabase> database,
|
| + const OpenCallback& callback) {
|
| // This is the place where we open a database.
|
| leveldb::Options options;
|
| options.create_if_missing = true;
|
|
|