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

Issue 1643733002: Revert of mojo filesystem: Simplify full file reading/writing. (Closed)

Created:
4 years, 11 months ago by Garrett Casto
Modified:
4 years, 11 months ago
Reviewers:
Elliot Glaysher, sky
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of mojo filesystem: Simplify full file reading/writing. (patchset #5 id:80001 of https://codereview.chromium.org/1634293002/ ) Reason for revert: Broke the Windows build. https://build.chromium.org/p/chromium.win/builders/Win%20x64%20GN/builds/10430/steps/compile/logs/stdio FAILED: ninja -t msvc -e environment.x64 -- E:\b\build\goma/gomacc.exe "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64/cl.exe" /nologo /showIncludes /FC @obj/components/filesystem/lib/directory_impl.obj.rsp /c ../../components/filesystem/directory_impl.cc /Foobj/components/filesystem/lib/directory_impl.obj /Fdobj/components/filesystem/lib_cc.pdb e:\b\build\slave\win_x64_gn\build\src\components\filesystem\directory_impl.cc(274) : error C2220: warning treated as error - no 'object' file generated e:\b\build\slave\win_x64_gn\build\src\components\filesystem\directory_impl.cc(274) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data ninja: build stopped: subcommand failed. Original issue's description: > mojo filesystem: Simplify full file reading/writing. > > One common pattern that's coming up multiple times is that we want to > read or write the full contents of a file. The first attempt at an > interface to that had was put on the File object. > > However, file seeking behaviour differs between platforms. Performing a > seek on an empty file is safe on posix and errors on Windows. And when > dealing with arbitrary File objects, we want to seek to the beginning > just in case there was any previous usage on the File object. > > It was also cumbersome. The user was still responsible for opening the > file and closing it once they were done with it. Putting these > operations on Directory not only removes a bug, but also simplifies the > interface. > > BUG=557405 > > Committed: https://crrev.com/fd918ae590f61f145d75c800abb8eb050ca32b06 > Cr-Commit-Position: refs/heads/master@{#371845} TBR=sky@chromium.org,erg@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=557405 Committed: https://crrev.com/47a6da618093dbe5db1d19b656548f27776c1276 Cr-Commit-Position: refs/heads/master@{#371863}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -181 lines) Patch
M components/filesystem/directory_impl.h View 1 chunk +0 lines, -5 lines 0 comments Download
M components/filesystem/directory_impl.cc View 3 chunks +1 line, -66 lines 0 comments Download
M components/filesystem/directory_impl_unittest.cc View 2 chunks +0 lines, -88 lines 0 comments Download
M components/filesystem/file_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/filesystem/file_impl.cc View 1 chunk +22 lines, -0 lines 0 comments Download
M components/filesystem/public/cpp/prefs/filesystem_json_pref_store.h View 2 chunks +7 lines, -1 line 0 comments Download
M components/filesystem/public/cpp/prefs/filesystem_json_pref_store.cc View 4 chunks +48 lines, -15 lines 0 comments Download
M components/filesystem/public/interfaces/directory.mojom View 1 chunk +0 lines, -6 lines 0 comments Download
M components/filesystem/public/interfaces/file.mojom View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Garrett Casto
Created Revert of mojo filesystem: Simplify full file reading/writing.
4 years, 11 months ago (2016-01-27 20:38:28 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1643733002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1643733002/1
4 years, 11 months ago (2016-01-27 20:41:19 UTC) #2
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 11 months ago (2016-01-27 20:44:43 UTC) #4
commit-bot: I haz the power
4 years, 11 months ago (2016-01-27 20:46:06 UTC) #6
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/47a6da618093dbe5db1d19b656548f27776c1276
Cr-Commit-Position: refs/heads/master@{#371863}

Powered by Google App Engine
This is Rietveld 408576698