diff options
author | jamesr <jamesr@chromium.org> | 2014-11-13 15:36:42 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-13 23:37:35 +0000 |
commit | 184f354ddeff66784515ddbbee9c46355cadab6a (patch) | |
tree | b19c2b86b9d05c08e640d0a79cb38d427b204eae /mojo/edk/test/test_utils_win.cc | |
parent | 4da4d40742403e9a9cad302473f4dce1745a149f (diff) | |
download | chromium_src-184f354ddeff66784515ddbbee9c46355cadab6a.zip chromium_src-184f354ddeff66784515ddbbee9c46355cadab6a.tar.gz chromium_src-184f354ddeff66784515ddbbee9c46355cadab6a.tar.bz2 |
Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/728553002
Cr-Commit-Position: refs/heads/master@{#304114}
Diffstat (limited to 'mojo/edk/test/test_utils_win.cc')
-rw-r--r-- | mojo/edk/test/test_utils_win.cc | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/mojo/edk/test/test_utils_win.cc b/mojo/edk/test/test_utils_win.cc index 5d5b942..2387945 100644 --- a/mojo/edk/test/test_utils_win.cc +++ b/mojo/edk/test/test_utils_win.cc @@ -23,14 +23,11 @@ bool BlockingWrite(const embedder::PlatformHandle& handle, OVERLAPPED overlapped = {0}; DWORD bytes_written_dword = 0; - if (!WriteFile(handle.handle, - buffer, - static_cast<DWORD>(bytes_to_write), - &bytes_written_dword, - &overlapped)) { + if (!WriteFile(handle.handle, buffer, static_cast<DWORD>(bytes_to_write), + &bytes_written_dword, &overlapped)) { if (GetLastError() != ERROR_IO_PENDING || - !GetOverlappedResult( - handle.handle, &overlapped, &bytes_written_dword, TRUE)) { + !GetOverlappedResult(handle.handle, &overlapped, &bytes_written_dword, + TRUE)) { return false; } } @@ -46,14 +43,11 @@ bool BlockingRead(const embedder::PlatformHandle& handle, OVERLAPPED overlapped = {0}; DWORD bytes_read_dword = 0; - if (!ReadFile(handle.handle, - buffer, - static_cast<DWORD>(buffer_size), - &bytes_read_dword, - &overlapped)) { + if (!ReadFile(handle.handle, buffer, static_cast<DWORD>(buffer_size), + &bytes_read_dword, &overlapped)) { if (GetLastError() != ERROR_IO_PENDING || - !GetOverlappedResult( - handle.handle, &overlapped, &bytes_read_dword, TRUE)) { + !GetOverlappedResult(handle.handle, &overlapped, &bytes_read_dword, + TRUE)) { return false; } } @@ -69,18 +63,15 @@ bool NonBlockingRead(const embedder::PlatformHandle& handle, OVERLAPPED overlapped = {0}; DWORD bytes_read_dword = 0; - if (!ReadFile(handle.handle, - buffer, - static_cast<DWORD>(buffer_size), - &bytes_read_dword, - &overlapped)) { + if (!ReadFile(handle.handle, buffer, static_cast<DWORD>(buffer_size), + &bytes_read_dword, &overlapped)) { if (GetLastError() != ERROR_IO_PENDING) return false; CancelIo(handle.handle); - if (!GetOverlappedResult( - handle.handle, &overlapped, &bytes_read_dword, TRUE)) { + if (!GetOverlappedResult(handle.handle, &overlapped, &bytes_read_dword, + TRUE)) { *bytes_read = 0; return true; } @@ -97,11 +88,7 @@ embedder::ScopedPlatformHandle PlatformHandleFromFILE(base::ScopedFILE fp) { PCHECK(DuplicateHandle( GetCurrentProcess(), reinterpret_cast<HANDLE>(_get_osfhandle(_fileno(fp.get()))), - GetCurrentProcess(), - &rv, - 0, - TRUE, - DUPLICATE_SAME_ACCESS)) + GetCurrentProcess(), &rv, 0, TRUE, DUPLICATE_SAME_ACCESS)) << "DuplicateHandle"; return embedder::ScopedPlatformHandle(embedder::PlatformHandle(rv)); } |