Chromium Code Reviews| Index: base/platform_file_unittest.cc |
| =================================================================== |
| --- base/platform_file_unittest.cc (revision 97736) |
| +++ base/platform_file_unittest.cc (working copy) |
| @@ -37,23 +37,7 @@ |
| // Returns the number of bytes written. |
| int WriteFully(base::PlatformFile file, int64 offset, |
| const char* data, int size) { |
| - int total_bytes_written = 0; |
| - int bytes_written; |
| - while (total_bytes_written < size) { |
| - bytes_written = base::WritePlatformFile( |
| - file, offset + total_bytes_written, &data[total_bytes_written], |
| - size - total_bytes_written); |
| - |
| - if ((bytes_written == 0) && (size == 0)) |
| - return 0; |
| - |
| - if ((bytes_written <= 0) || (bytes_written > size - total_bytes_written)) |
| - return -1; |
| - |
| - total_bytes_written += bytes_written; |
| - } |
| - |
| - return total_bytes_written; |
|
Scott Hess - ex-Googler
2011/08/25 21:05:23
I'm kinda happy you're removing this code!
I'm ki
rvargas (doing something else)
2011/08/25 21:28:06
I looked at all the callers of this code and only
|
| + return base::WritePlatformFile(file, offset, data, size); |
| } |
| } // namespace |