Chris Mumford | 3e27630 | 2017-09-06 20:49:05 | [diff] [blame] | 1 | // Copyright 2017 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 | |
Chris Mumford | c90ae1e | 2017-09-26 17:39:29 | [diff] [blame] | 5 | #ifndef COMPONENTS_LEVELDB_LEVELDB_STRUCT_TRAITS_H_ |
| 6 | #define COMPONENTS_LEVELDB_LEVELDB_STRUCT_TRAITS_H_ |
Chris Mumford | 3e27630 | 2017-09-06 20:49:05 | [diff] [blame] | 7 | |
| 8 | #include "components/leveldb/public/interfaces/leveldb.mojom.h" |
| 9 | |
| 10 | namespace mojo { |
| 11 | |
| 12 | template <> |
| 13 | struct StructTraits<leveldb::mojom::OpenOptionsDataView, leveldb_env::Options> { |
| 14 | static bool create_if_missing(const leveldb_env::Options& options); |
| 15 | static bool error_if_exists(const leveldb_env::Options& options); |
| 16 | static bool paranoid_checks(const leveldb_env::Options& options); |
| 17 | static uint64_t write_buffer_size(const leveldb_env::Options& options); |
| 18 | static int32_t max_open_files(const leveldb_env::Options& options); |
| 19 | static ::leveldb::mojom::SharedReadCache shared_block_read_cache( |
| 20 | const leveldb_env::Options& options); |
| 21 | static bool Read(::leveldb::mojom::OpenOptionsDataView data, |
| 22 | leveldb_env::Options* out); |
| 23 | }; |
| 24 | |
| 25 | } // namespace mojo |
| 26 | |
Chris Mumford | c90ae1e | 2017-09-26 17:39:29 | [diff] [blame] | 27 | #endif // COMPONENTS_LEVELDB_LEVELDB_STRUCT_TRAITS_H_ |