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

Side by Side Diff: chromecast/base/file_utils.h

Issue 2203123003: [Chromecast] Remove usage of nonreentrant functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Bool error codes Created 4 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROMECAST_BASE_FILE_UTILS_H_
6 #define CHROMECAST_BASE_FILE_UTILS_H_
7
8 #include "base/files/file_path.h"
9
10 namespace chromecast {
11
12 // Lock a file (blocking request) with filepath |path|. Returns the file
13 // descriptor on success, an invalid file descriptor (-1) on failure. Failure
14 // indicates that |path| does not exist, or the locking procedure failed.
15 int OpenAndLockFile(const base::FilePath& path);
slan 2016/08/08 16:37:10 What is the expectation if the file does not exist
ameyak 2016/08/08 18:00:43 Returns invalid file descriptor (-1)
slan 2016/08/08 18:32:19 Oh, it's right there in the comment. https://i.yt
16
17 // Unlock a file (blocking request) denoted by file descriptor |fd|. Returns
18 // true on success, false on failure.
19 bool UnlockAndCloseFile(const int fd);
20
21 } // namespace chromecast
22
23 #endif // CHROMECAST_BASE_FILE_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698