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

Unified Diff: third_party/leveldatabase/env_chromium.cc

Issue 899933002: IndexedDB: Re-enable leveldb manifest reuse. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « third_party/leveldatabase/env_chromium.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/leveldatabase/env_chromium.cc
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index 1a150d144d33fee7bc04ce5526b548871f757d0b..84ae4acbb020c6728b40b39318ff7189d5da6bf5 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -898,6 +898,22 @@ Status ChromiumEnv::NewWritableFile(const std::string& fname,
}
}
+Status ChromiumEnv::NewAppendableFile(const std::string& fname,
+ leveldb::WritableFile** result) {
+ *result = NULL;
+ FilePath path = FilePath::FromUTF8Unsafe(fname);
+ scoped_ptr<base::File> f(new base::File(
+ path, base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_APPEND));
+ if (!f->IsValid()) {
+ RecordErrorAt(kNewAppendableFile);
+ return MakeIOError(fname, "Unable to create appendable file",
+ kNewAppendableFile, f->error_details());
+ }
+ *result =
+ new ChromiumWritableFile(fname, f.release(), this, this, make_backup_);
+ return Status::OK();
+}
+
uint64_t ChromiumEnv::NowMicros() {
return base::TimeTicks::Now().ToInternalValue();
}
« no previous file with comments | « third_party/leveldatabase/env_chromium.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698