blob: 94221096c54c40c15359dd0e294ad23e0d62d5e5 [file] [log] [blame]
Chris Mumford3e276302017-09-06 20:49:051// 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 Mumfordc90ae1e2017-09-26 17:39:295#ifndef COMPONENTS_LEVELDB_LEVELDB_STRUCT_TRAITS_H_
6#define COMPONENTS_LEVELDB_LEVELDB_STRUCT_TRAITS_H_
Chris Mumford3e276302017-09-06 20:49:057
8#include "components/leveldb/public/interfaces/leveldb.mojom.h"
9
10namespace mojo {
11
12template <>
13struct 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 Mumfordc90ae1e2017-09-26 17:39:2927#endif // COMPONENTS_LEVELDB_LEVELDB_STRUCT_TRAITS_H_