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

Issue 614893004: Refactor AppendToFile and WriteFileDescriptor (Closed)

Created:
6 years, 2 months ago by Chirantan Ekbote
Modified:
6 years, 2 months ago
CC:
aandrey+blink_chromium.org, avayvod+watch_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, devtools-reviews_chromium.org, erikwright+watch_chromium.org, eroman, feature-media-reviews_chromium.org, Greg Billock, hclam+watch_chromium.org, hguihot+watch_chromium.org, hubbe+watch_chromium.org, imcheng+watch_chromium.org, jam, jasonroberts+watch_google.com, mcasas+watch_chromium.org, mikhal+watch_chromium.org, miu+watch_chromium.org, mmenke, oshima+watch_chromium.org, paulirish+reviews_chromium.org, pfeldman, piman+watch_chromium.org, posciak+watch_chromium.org, pwestin+watch_google.com, Sameer Nanda, stevenjb+watch_chromium.org, tommycli, vandebo (ex-Chrome), vsevik, wjia+watch_chromium.org, yurys
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Refactor AppendToFile and WriteFileDescriptor - Unify the behavior of the windows and posix implementations of these functions. - Simplify the interface by having them just indicate success or failure instead of making callers deal with partial writes. BUG=418837 Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>; Committed: https://crrev.com/75ea2fdb5c87f133a8e1b8da16f6091fb7d5321e Cr-Commit-Position: refs/heads/master@{#298604}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Remove last error guarantee, use VPLOG #

Patch Set 3 : Address nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -94 lines) Patch
M base/files/file_util.h View 1 2 1 chunk +8 lines, -6 lines 0 comments Download
M base/files/file_util_posix.cc View 1 2 chunks +22 lines, -11 lines 0 comments Download
M base/files/file_util_unittest.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M base/files/file_util_win.cc View 1 2 chunks +8 lines, -10 lines 0 comments Download
M base/sync_socket_posix.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M base/test/trace_to_file.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/devtools/devtools_file_helper.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/media/webrtc_rtp_dump_writer.cc View 3 chunks +12 lines, -10 lines 0 comments Download
M chrome/browser/media_galleries/linux/mtp_read_file_worker.cc View 1 chunk +3 lines, -5 lines 0 comments Download
M chrome/browser/media_galleries/win/mtp_device_operations_util.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/net/net_log_temp_file_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/shell_integration_linux.cc View 2 chunks +4 lines, -6 lines 0 comments Download
M chromeos/process_proxy/process_output_watcher_unittest.cc View 1 2 chunks +3 lines, -4 lines 0 comments Download
M chromeos/process_proxy/process_proxy.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M components/metrics/serialization/serialization_utils.cc View 1 chunk +7 lines, -8 lines 0 comments Download
M components/policy/core/common/policy_loader_win_unittest.cc View 1 1 chunk +4 lines, -5 lines 0 comments Download
M content/common/gpu/media/vaapi_h264_decoder_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/common/gpu/media/video_encode_accelerator_unittest.cc View 1 1 chunk +4 lines, -5 lines 0 comments Download
M media/cast/test/simulator.cc View 1 chunk +1 line, -1 line 0 comments Download
M third_party/zlib/google/zip_reader.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ui/base/resource/data_pack_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 31 (9 generated)
Chirantan Ekbote
This is my first attempt at cleaning up the file writing in base. Please take ...
6 years, 2 months ago (2014-10-01 17:49:21 UTC) #2
tbarzic
On 2014/10/01 17:49:21, chirantan wrote: > This is my first attempt at cleaning up the ...
6 years, 2 months ago (2014-10-01 17:53:04 UTC) #3
Avi (use Gerrit)
content/ and ui/ LGTM
6 years, 2 months ago (2014-10-01 18:06:01 UTC) #4
rvargas (doing something else)
https://codereview.chromium.org/614893004/diff/1/base/files/file_util.h File base/files/file_util.h (right): https://codereview.chromium.org/614893004/diff/1/base/files/file_util.h#newcode329 base/files/file_util.h:329: // Append |data| to |fd|. Does not close |fd| ...
6 years, 2 months ago (2014-10-01 20:01:14 UTC) #5
brettw
I'm anti-errno myself, and this is a cross-platform wrapper so most calling code doesn't know ...
6 years, 2 months ago (2014-10-01 20:19:46 UTC) #6
Chirantan Ekbote
On 2014/10/01 at 20:19:46, brettw wrote: > I'm anti-errno myself, and this is a cross-platform ...
6 years, 2 months ago (2014-10-01 20:25:26 UTC) #7
rvargas (doing something else)
On 2014/10/01 20:25:26, chirantan wrote: > On 2014/10/01 at 20:19:46, brettw wrote: > > I'm ...
6 years, 2 months ago (2014-10-01 21:33:14 UTC) #8
wolenetz
media/ l g t m % 1. cast is a bit of a different beast. ...
6 years, 2 months ago (2014-10-02 00:30:18 UTC) #9
Pawel Osciak
content/common/gpu/media lgtm
6 years, 2 months ago (2014-10-02 01:05:15 UTC) #10
miu
On 2014/10/02 00:30:18, wolenetz wrote: > 1. cast is a bit of a different beast. ...
6 years, 2 months ago (2014-10-04 01:28:33 UTC) #12
jochen (gone - plz use gerrit)
my bits lgtm
6 years, 2 months ago (2014-10-06 07:35:09 UTC) #14
Chirantan Ekbote
I've removed the bit about guaranteeing that the last error is preserved and made it ...
6 years, 2 months ago (2014-10-06 18:18:04 UTC) #15
rvargas (doing something else)
base lgtm
6 years, 2 months ago (2014-10-06 18:47:26 UTC) #16
Chirantan Ekbote
Hi Haixia, please review this change as owner of third_party/zlib.
6 years, 2 months ago (2014-10-06 19:13:55 UTC) #18
hshi1
On 2014/10/06 19:13:55, chirantan wrote: > Hi Haixia, please review this change as owner of ...
6 years, 2 months ago (2014-10-06 19:16:09 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/614893004/40001
6 years, 2 months ago (2014-10-06 19:46:04 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu_triggered_tests/builds/65078)
6 years, 2 months ago (2014-10-06 21:58:10 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/614893004/40001
6 years, 2 months ago (2014-10-06 23:49:36 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu_triggered_tests/builds/65078)
6 years, 2 months ago (2014-10-07 01:03:48 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/614893004/40001
6 years, 2 months ago (2014-10-07 23:13:31 UTC) #29
commit-bot: I haz the power
Committed patchset #3 (id:40001) as 41d8cd3dea64c1f1851a5e2c0dd98557b823381f
6 years, 2 months ago (2014-10-07 23:15:49 UTC) #30
commit-bot: I haz the power
6 years, 2 months ago (2014-10-07 23:16:30 UTC) #31
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/75ea2fdb5c87f133a8e1b8da16f6091fb7d5321e
Cr-Commit-Position: refs/heads/master@{#298604}

Powered by Google App Engine
This is Rietveld 408576698