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 #ifndef COMPONENTS_LEVELDB_ENV_MOJO_H_ | 5 #ifndef COMPONENTS_LEVELDB_ENV_MOJO_H_ |
6 #define COMPONENTS_LEVELDB_ENV_MOJO_H_ | 6 #define COMPONENTS_LEVELDB_ENV_MOJO_H_ |
7 | 7 |
8 #include "components/filesystem/public/interfaces/directory.mojom.h" | 8 #include "components/filesystem/public/interfaces/directory.mojom.h" |
9 #include "components/leveldb/leveldb_mojo_proxy.h" | 9 #include "components/leveldb/leveldb_mojo_proxy.h" |
10 #include "third_party/leveldatabase/env_chromium.h" | 10 #include "third_party/leveldatabase/env_chromium.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 uint64_t NowMicros() override; | 48 uint64_t NowMicros() override; |
49 void SleepForMicroseconds(int micros) override; | 49 void SleepForMicroseconds(int micros) override; |
50 void Schedule(void (*function)(void* arg), void* arg) override; | 50 void Schedule(void (*function)(void* arg), void* arg) override; |
51 void StartThread(void (*function)(void* arg), void* arg) override; | 51 void StartThread(void (*function)(void* arg), void* arg) override; |
52 | 52 |
53 private: | 53 private: |
54 void RecordErrorAt(leveldb_env::MethodID method) const override; | 54 void RecordErrorAt(leveldb_env::MethodID method) const override; |
55 void RecordOSError(leveldb_env::MethodID method, | 55 void RecordOSError(leveldb_env::MethodID method, |
56 base::File::Error error) const override; | 56 base::File::Error error) const override; |
| 57 void RecordBytesRead(int amount) const override; |
| 58 void RecordBytesWritten(int amount) const override; |
57 | 59 |
58 void RecordFileError(leveldb_env::MethodID method, | 60 void RecordFileError(leveldb_env::MethodID method, |
59 filesystem::mojom::FileError error) const; | 61 filesystem::mojom::FileError error) const; |
60 | 62 |
61 scoped_refptr<LevelDBMojoProxy> thread_; | 63 scoped_refptr<LevelDBMojoProxy> thread_; |
62 LevelDBMojoProxy::OpaqueDir* dir_; | 64 LevelDBMojoProxy::OpaqueDir* dir_; |
63 | 65 |
64 DISALLOW_COPY_AND_ASSIGN(MojoEnv); | 66 DISALLOW_COPY_AND_ASSIGN(MojoEnv); |
65 }; | 67 }; |
66 | 68 |
67 } // namespace leveldb | 69 } // namespace leveldb |
68 | 70 |
69 #endif // COMPONENTS_LEVELDB_ENV_MOJO_H_ | 71 #endif // COMPONENTS_LEVELDB_ENV_MOJO_H_ |
OLD | NEW |