summaryrefslogtreecommitdiffstats
path: root/chromium/base/files/file.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-16 09:59:13 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-20 10:28:53 +0000
commit6c11fb357ec39bf087b8b632e2b1e375aef1b38b (patch)
treec8315530db18a8ee566521c39ab8a6af4f72bc03 /chromium/base/files/file.h
parent3ffaed019d0772e59d6cdb2d0d32fe4834c31f72 (diff)
BASELINE: Update Chromium to 74.0.3729.159
Change-Id: I8d2497da544c275415aedd94dd25328d555de811 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/base/files/file.h')
-rw-r--r--chromium/base/files/file.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/chromium/base/files/file.h b/chromium/base/files/file.h
index 30f40532147..cc157a49e97 100644
--- a/chromium/base/files/file.h
+++ b/chromium/base/files/file.h
@@ -264,6 +264,10 @@ class BASE_EXPORT File {
bool GetInfo(Info* info);
#if !defined(OS_FUCHSIA) // Fuchsia's POSIX API does not support file locking.
+ enum class LockMode {
+ kShared,
+ kExclusive,
+ };
// Attempts to take an exclusive write lock on the file. Returns immediately
// (i.e. does not wait for another process to unlock the file). If the lock
@@ -283,9 +287,9 @@ class BASE_EXPORT File {
// POSIX-specific semantics:
// * Locks are advisory only.
// * Within a process, locking the same file (by the same or new handle)
- // will succeed.
+ // will succeed. The new lock replaces the old lock.
// * Closing any descriptor on a given file releases the lock.
- Error Lock();
+ Error Lock(LockMode mode = LockMode::kExclusive);
// Unlock a file previously locked.
Error Unlock();