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

Unified Diff: util/file/file_io_posix.cc

Issue 1409973004: Fix Mac after FileOperationResult change (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/file/file_io_posix.cc
diff --git a/util/file/file_io_posix.cc b/util/file/file_io_posix.cc
index 866b1ab1d1e5f602af54b2a0465e515376ebb3c1..ce08a3960c5b39c591efa9c599670129bfcd839b 100644
--- a/util/file/file_io_posix.cc
+++ b/util/file/file_io_posix.cc
@@ -28,9 +28,9 @@ namespace {
struct ReadTraits {
using VoidBufferType = void*;
using CharBufferType = char*;
- static FileOperationResult Operate(int fd,
- CharBufferType buffer,
- size_t size) {
+ static crashpad::FileOperationResult Operate(int fd,
+ CharBufferType buffer,
+ size_t size) {
return read(fd, buffer, size);
}
};
@@ -38,23 +38,22 @@ struct ReadTraits {
struct WriteTraits {
using VoidBufferType = const void*;
using CharBufferType = const char*;
- static FileOperationResult Operate(int fd,
- CharBufferType buffer,
- size_t size) {
+ static crashpad::FileOperationResult Operate(int fd,
+ CharBufferType buffer,
+ size_t size) {
return write(fd, buffer, size);
}
};
template <typename Traits>
-FileOperationResult ReadOrWrite(int fd,
- typename Traits::VoidBufferType buffer,
- size_t size) {
+crashpad::FileOperationResult
+ReadOrWrite(int fd, typename Traits::VoidBufferType buffer, size_t size) {
typename Traits::CharBufferType buffer_c =
reinterpret_cast<typename Traits::CharBufferType>(buffer);
- FileOperationResult total_bytes = 0;
+ crashpad::FileOperationResult total_bytes = 0;
while (size > 0) {
- FileOperationResult bytes =
+ crashpad::FileOperationResult bytes =
HANDLE_EINTR(Traits::Operate(fd, buffer_c, size));
if (bytes < 0) {
return bytes;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698