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

Unified Diff: third_party/leveldatabase/env_chromium_win.h

Issue 710373002: LevelDB: Using base::File for all file I/O (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment for GetDirectoryEntries, using ReadAtCurrentPosNoBestEffort Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/leveldatabase/env_chromium_unittest.cc ('k') | third_party/leveldatabase/env_chromium_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/leveldatabase/env_chromium_win.h
diff --git a/third_party/leveldatabase/env_chromium_win.h b/third_party/leveldatabase/env_chromium_win.h
deleted file mode 100644
index dcd308afa2359817929aa757f8d14cef2b0a4b8c..0000000000000000000000000000000000000000
--- a/third_party/leveldatabase/env_chromium_win.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2013 The LevelDB Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-#ifndef THIRD_PARTY_LEVELDATABASE_ENV_CHROMIUM_WIN_H_
-#define THIRD_PARTY_LEVELDATABASE_ENV_CHROMIUM_WIN_H_
-
-#include <string>
-#include <vector>
-
-#include "third_party/leveldatabase/env_chromium.h"
-
-namespace leveldb_env {
-
-leveldb::Status MakeIOErrorWin(leveldb::Slice filename,
- const std::string& message,
- MethodID method,
- DWORD err);
-
-class ChromiumWritableFileWin : public leveldb::WritableFile {
- public:
- ChromiumWritableFileWin(const std::string& fname,
- HANDLE f,
- const UMALogger* uma_logger,
- WriteTracker* tracker,
- bool make_backup);
- virtual ~ChromiumWritableFileWin();
- virtual leveldb::Status Append(const leveldb::Slice& data);
- virtual leveldb::Status Close();
- virtual leveldb::Status Flush();
- virtual leveldb::Status Sync();
-
- private:
- enum Type {
- kManifest,
- kTable,
- kOther
- };
- leveldb::Status SyncParent();
-
- std::string filename_;
- HANDLE file_;
- const UMALogger* uma_logger_;
- WriteTracker* tracker_;
- Type file_type_;
- std::string parent_dir_;
- bool make_backup_;
-};
-
-class ChromiumEnvWin : public ChromiumEnv {
- public:
- ChromiumEnvWin();
- virtual ~ChromiumEnvWin();
-
- virtual leveldb::Status NewSequentialFile(const std::string& fname,
- leveldb::SequentialFile** result);
- virtual leveldb::Status NewRandomAccessFile(
- const std::string& fname,
- leveldb::RandomAccessFile** result);
- virtual leveldb::Status NewWritableFile(const std::string& fname,
- leveldb::WritableFile** result);
- virtual leveldb::Status NewLogger(const std::string& fname,
- leveldb::Logger** result);
-
- protected:
- virtual base::File::Error GetDirectoryEntries(
- const base::FilePath& dir_param,
- std::vector<base::FilePath>* result) const;
-
- private:
- // BGThread() is the body of the background thread
- void BGThread();
- static void BGThreadWrapper(void* arg) {
- reinterpret_cast<ChromiumEnvWin*>(arg)->BGThread();
- }
- void RecordOpenFilesLimit(const std::string& type);
- virtual void RecordOSError(MethodID method, DWORD err) const;
-};
-
-} // namespace leveldb_env
-
-#endif // THIRD_PARTY_LEVELDATABASE_ENV_CHROMIUM_WIN_H_
« no previous file with comments | « third_party/leveldatabase/env_chromium_unittest.cc ('k') | third_party/leveldatabase/env_chromium_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698