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

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

Issue 2608163003: Change single-interface mojo bindings to use SequencedTaskRunner. (Closed)
Patch Set: Created 3 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 | « chrome/test/base/mojo_test_connector.cc ('k') | device/generic_sensor/platform_sensor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/leveldb/leveldb_service_impl.h" 5 #include "components/leveldb/leveldb_service_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/single_thread_task_runner.h"
10 #include "components/leveldb/env_mojo.h" 11 #include "components/leveldb/env_mojo.h"
11 #include "components/leveldb/leveldb_database_impl.h" 12 #include "components/leveldb/leveldb_database_impl.h"
12 #include "components/leveldb/public/cpp/util.h" 13 #include "components/leveldb/public/cpp/util.h"
13 #include "mojo/public/cpp/bindings/strong_associated_binding.h" 14 #include "mojo/public/cpp/bindings/strong_associated_binding.h"
14 #include "third_party/leveldatabase/env_chromium.h" 15 #include "third_party/leveldatabase/env_chromium.h"
15 #include "third_party/leveldatabase/src/helpers/memenv/memenv.h" 16 #include "third_party/leveldatabase/src/helpers/memenv/memenv.h"
16 #include "third_party/leveldatabase/src/include/leveldb/db.h" 17 #include "third_party/leveldatabase/src/include/leveldb/db.h"
17 #include "third_party/leveldatabase/src/include/leveldb/env.h" 18 #include "third_party/leveldatabase/src/include/leveldb/env.h"
18 #include "third_party/leveldatabase/src/include/leveldb/filter_policy.h" 19 #include "third_party/leveldatabase/src/include/leveldb/filter_policy.h"
19 #include "third_party/leveldatabase/src/include/leveldb/slice.h" 20 #include "third_party/leveldatabase/src/include/leveldb/slice.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 leveldb::Options options; 101 leveldb::Options options;
101 // Register our directory with the file thread. 102 // Register our directory with the file thread.
102 LevelDBMojoProxy::OpaqueDir* dir = 103 LevelDBMojoProxy::OpaqueDir* dir =
103 thread_->RegisterDirectory(std::move(directory)); 104 thread_->RegisterDirectory(std::move(directory));
104 std::unique_ptr<MojoEnv> env_mojo(new MojoEnv(thread_, dir)); 105 std::unique_ptr<MojoEnv> env_mojo(new MojoEnv(thread_, dir));
105 options.env = env_mojo.get(); 106 options.env = env_mojo.get();
106 callback.Run(LeveldbStatusToError(leveldb::DestroyDB(dbname, options))); 107 callback.Run(LeveldbStatusToError(leveldb::DestroyDB(dbname, options)));
107 } 108 }
108 109
109 } // namespace leveldb 110 } // namespace leveldb
OLDNEW
« no previous file with comments | « chrome/test/base/mojo_test_connector.cc ('k') | device/generic_sensor/platform_sensor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698