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

Unified Diff: third_party/leveldatabase/env_chromium.h

Issue 1022983004: leveldb: Env no longer implicitly syncs dir for all newly created files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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 | « no previous file | third_party/leveldatabase/env_chromium.cc » ('j') | third_party/leveldatabase/env_chromium.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/leveldatabase/env_chromium.h
diff --git a/third_party/leveldatabase/env_chromium.h b/third_party/leveldatabase/env_chromium.h
index 6fb7180f55079bae2f8165e67263ea11efffcbc6..a6064828d09002b0867fd04776cec13e5d048854 100644
--- a/third_party/leveldatabase/env_chromium.h
+++ b/third_party/leveldatabase/env_chromium.h
@@ -87,17 +87,9 @@ class RetrierProvider {
MethodID method) const = 0;
};
-class WriteTracker {
- public:
- virtual void DidCreateNewFile(const std::string& fname) = 0;
- virtual bool DoesDirNeedSync(const std::string& fname) = 0;
- virtual void DidSyncDir(const std::string& fname) = 0;
-};
-
class ChromiumEnv : public leveldb::Env,
public UMALogger,
- public RetrierProvider,
- public WriteTracker {
+ public RetrierProvider {
public:
ChromiumEnv();
@@ -136,16 +128,12 @@ class ChromiumEnv : public leveldb::Env,
leveldb::Logger** result);
protected:
- virtual void DidSyncDir(const std::string& fname);
-
std::string name_;
bool make_backup_;
private:
static const char* FileErrorString(base::File::Error error);
- virtual void DidCreateNewFile(const std::string& fname);
- virtual bool DoesDirNeedSync(const std::string& fname);
virtual void RecordErrorAt(MethodID method) const;
virtual void RecordOSError(MethodID method,
base::File::Error error) const;
@@ -170,9 +158,6 @@ class ChromiumEnv : public leveldb::Env,
std::set<std::string> locked_files_;
};
- std::set<std::string> directories_needing_sync_;
- base::Lock directory_sync_lock_;
-
const int kMaxRetryTimeMillis;
// BGThread() is the body of the background thread
void BGThread();
« no previous file with comments | « no previous file | third_party/leveldatabase/env_chromium.cc » ('j') | third_party/leveldatabase/env_chromium.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698