| Index: third_party/leveldatabase/env_chromium.cc
|
| diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
|
| index cad20412bb343f5abf69b9eb7cc27b6448814e7b..558a04342cae6ba470bd806c480f1cf4f8675b7d 100644
|
| --- a/third_party/leveldatabase/env_chromium.cc
|
| +++ b/third_party/leveldatabase/env_chromium.cc
|
| @@ -358,6 +358,8 @@ const char* MethodIDToString(MethodID method) {
|
| return "NewRandomAccessFile";
|
| case kNewWritableFile:
|
| return "NewWritableFile";
|
| + case kNewAppendableFile:
|
| + return "NewAppendableFile";
|
| case kDeleteFile:
|
| return "DeleteFile";
|
| case kCreateDir:
|
| @@ -900,6 +902,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();
|
| }
|
|
|