OLD | NEW |
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_mojo_proxy.h" | 5 #include "components/leveldb/leveldb_mojo_proxy.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/single_thread_task_runner.h" |
11 #include "mojo/public/cpp/bindings/interface_request.h" | 12 #include "mojo/public/cpp/bindings/interface_request.h" |
12 #include "mojo/public/cpp/system/platform_handle.h" | 13 #include "mojo/public/cpp/system/platform_handle.h" |
13 | 14 |
14 namespace leveldb { | 15 namespace leveldb { |
15 | 16 |
16 struct LevelDBMojoProxy::OpaqueLock { | 17 struct LevelDBMojoProxy::OpaqueLock { |
17 filesystem::mojom::FilePtr lock_file; | 18 filesystem::mojom::FilePtr lock_file; |
18 }; | 19 }; |
19 | 20 |
20 struct LevelDBMojoProxy::OpaqueDir { | 21 struct LevelDBMojoProxy::OpaqueDir { |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 *out_lock = l; | 323 *out_lock = l; |
323 } | 324 } |
324 } | 325 } |
325 | 326 |
326 void LevelDBMojoProxy::UnlockFileImpl(std::unique_ptr<OpaqueLock> lock, | 327 void LevelDBMojoProxy::UnlockFileImpl(std::unique_ptr<OpaqueLock> lock, |
327 filesystem::mojom::FileError* out_error) { | 328 filesystem::mojom::FileError* out_error) { |
328 lock->lock_file->Unlock(out_error); | 329 lock->lock_file->Unlock(out_error); |
329 } | 330 } |
330 | 331 |
331 } // namespace leveldb | 332 } // namespace leveldb |
OLD | NEW |