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

Unified Diff: components/filesystem/lock_table.cc

Issue 1724493003: mojo leveldb: Address some comments that came after it was put in the CQ. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile failure Created 4 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 | « components/filesystem/directory_impl.cc ('k') | components/leveldb/env_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/filesystem/lock_table.cc
diff --git a/components/filesystem/lock_table.cc b/components/filesystem/lock_table.cc
index 63ab1185c017ae05cc72b3bfbf55c2da33ad07c9..4f43672630af676d7a18305d863735260332c85c 100644
--- a/components/filesystem/lock_table.cc
+++ b/components/filesystem/lock_table.cc
@@ -14,6 +14,7 @@ LockTable::~LockTable() {}
base::File::Error LockTable::LockFile(FileImpl* file) {
DCHECK(file->IsValid());
+ DCHECK(file->path().IsAbsolute());
auto it = locked_files_.find(file->path());
if (it != locked_files_.end()) {
@@ -34,14 +35,14 @@ base::File::Error LockTable::LockFile(FileImpl* file) {
base::File::Error LockTable::UnlockFile(FileImpl* file) {
auto it = locked_files_.find(file->path());
if (it != locked_files_.end()) {
- locked_files_.erase(it);
-
base::File::Error lock_err = file->RawUnlockFile();
if (lock_err != base::File::FILE_OK) {
// TODO(erg): When can we fail to release a lock?
NOTREACHED();
return lock_err;
}
+
+ locked_files_.erase(it);
}
return base::File::FILE_OK;
« no previous file with comments | « components/filesystem/directory_impl.cc ('k') | components/leveldb/env_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698