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

Side by Side Diff: components/leveldb/leveldb_service_impl.h

Issue 1708253004: mojo: Get mojo:leveldb and mojo:filesystem compiled into content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Probable fix to the build flake. 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 unified diff | Download patch
« no previous file with comments | « components/leveldb/leveldb_app.cc ('k') | components/leveldb/leveldb_service_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_LEVELDB_LEVELDB_SERVICE_IMPL_H_
6 #define COMPONENTS_LEVELDB_LEVELDB_SERVICE_IMPL_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "components/leveldb/leveldb_file_thread.h"
10 #include "components/leveldb/public/interfaces/leveldb.mojom.h"
11
12 namespace leveldb {
13
14 // Creates LevelDBDatabases based scoped to a |directory|/|dbname|.
15 class LevelDBServiceImpl : public LevelDBService {
16 public:
17 LevelDBServiceImpl();
18 ~LevelDBServiceImpl() override;
19
20 // Overridden from LevelDBService:
21 void Open(filesystem::DirectoryPtr directory,
22 const mojo::String& dbname,
23 mojo::InterfaceRequest<LevelDBDatabase> database,
24 const OpenCallback& callback) override;
25
26 private:
27 // Thread to own the mojo message pipe. Because leveldb spawns multiple
28 // threads that want to call file stuff, we create a dedicated thread to send
29 // and receive mojo message calls.
30 scoped_refptr<LevelDBFileThread> thread_;
31
32 DISALLOW_COPY_AND_ASSIGN(LevelDBServiceImpl);
33 };
34
35 } // namespace leveldb
36
37 #endif // COMPONENTS_LEVELDB_LEVELDB_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « components/leveldb/leveldb_app.cc ('k') | components/leveldb/leveldb_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698