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

Issue 1303343007: Created a blocking copy to temporary file function. (Closed)

Created:
5 years, 3 months ago by Sean Klein
Modified:
5 years, 3 months ago
CC:
mojo-reviews_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Created a blocking copy to temporary file function. This functionality will be useful for creating temporary nexe files from the URLResponse in the nexe content handler. This change also modifies the SFI and nonsfi content handlers to use this new function. BUG=https://github.com/domokit/mojo/issues/396 R=mseaborn@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/a2b469511861b02b29a1b4c22805df467dcd420b

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Patch Set 3 : Added new BlockingCopy function to SFI content handler #

Total comments: 12

Patch Set 4 : Switched to ScopedFILE, formatted #

Total comments: 5

Patch Set 5 : Responded to code review #

Total comments: 4

Patch Set 6 : Less NULL, more nullptr #

Total comments: 6

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -98 lines) Patch
M mojo/data_pipe_utils/data_pipe_file_utils.cc View 1 2 3 4 5 1 chunk +16 lines, -10 lines 0 comments Download
M mojo/data_pipe_utils/data_pipe_utils.h View 1 2 3 2 chunks +6 lines, -5 lines 0 comments Download
M services/nacl/content_handler_main.cc View 1 2 3 4 5 6 6 chunks +39 lines, -51 lines 0 comments Download
M services/nacl/content_handler_main_nonsfi.cc View 1 2 3 4 5 6 2 chunks +16 lines, -32 lines 0 comments Download

Messages

Total messages: 23 (3 generated)
Sean Klein
5 years, 3 months ago (2015-09-01 23:26:21 UTC) #2
jamesr
Please add this code in the nexe content handler. When it's needed in multiple different ...
5 years, 3 months ago (2015-09-01 23:27:41 UTC) #3
viettrungluu
On 2015/09/01 23:27:41, jamesr wrote: > Please add this code in the nexe content handler. ...
5 years, 3 months ago (2015-09-01 23:33:50 UTC) #4
viettrungluu
https://codereview.chromium.org/1303343007/diff/1/mojo/data_pipe_utils/data_pipe_file_utils.cc File mojo/data_pipe_utils/data_pipe_file_utils.cc (right): https://codereview.chromium.org/1303343007/diff/1/mojo/data_pipe_utils/data_pipe_file_utils.cc#newcode333 mojo/data_pipe_utils/data_pipe_file_utils.cc:333: FILE** fpp) { Possibly this should be a base::ScopedFILE*. ...
5 years, 3 months ago (2015-09-01 23:36:25 UTC) #6
Sean Klein
So I'm a bit confused -- are you suggesting I move this functionality to the ...
5 years, 3 months ago (2015-09-01 23:57:42 UTC) #7
Sean Klein
https://codereview.chromium.org/1303343007/diff/1/mojo/data_pipe_utils/data_pipe_file_utils.cc File mojo/data_pipe_utils/data_pipe_file_utils.cc (right): https://codereview.chromium.org/1303343007/diff/1/mojo/data_pipe_utils/data_pipe_file_utils.cc#newcode333 mojo/data_pipe_utils/data_pipe_file_utils.cc:333: FILE** fpp) { On 2015/09/01 23:36:25, viettrungluu wrote: > ...
5 years, 3 months ago (2015-09-01 23:57:52 UTC) #8
Sean Klein
5 years, 3 months ago (2015-09-01 23:57:53 UTC) #9
jamesr
https://codereview.chromium.org/1303343007/diff/1/mojo/data_pipe_utils/data_pipe_file_utils.cc File mojo/data_pipe_utils/data_pipe_file_utils.cc (right): https://codereview.chromium.org/1303343007/diff/1/mojo/data_pipe_utils/data_pipe_file_utils.cc#newcode333 mojo/data_pipe_utils/data_pipe_file_utils.cc:333: FILE** fpp) { On 2015/09/01 at 23:57:52, smklein1 wrote: ...
5 years, 3 months ago (2015-09-02 00:06:39 UTC) #10
Sean Klein
In response to Mark's request: "Sean, can you change services/nacl/content_handler_main.cc to use the new function? ...
5 years, 3 months ago (2015-09-02 18:25:44 UTC) #12
Mark Seaborn
https://codereview.chromium.org/1303343007/diff/60001/mojo/data_pipe_utils/data_pipe_file_utils.cc File mojo/data_pipe_utils/data_pipe_file_utils.cc (right): https://codereview.chromium.org/1303343007/diff/60001/mojo/data_pipe_utils/data_pipe_file_utils.cc#newcode331 mojo/data_pipe_utils/data_pipe_file_utils.cc:331: base::Bind(&CopyToFileHelper, fp))) { Nit: fix indentation https://codereview.chromium.org/1303343007/diff/60001/mojo/data_pipe_utils/data_pipe_file_utils.cc#newcode332 mojo/data_pipe_utils/data_pipe_file_utils.cc:332: LOG(ERROR) ...
5 years, 3 months ago (2015-09-02 18:46:46 UTC) #13
Sean Klein
https://codereview.chromium.org/1303343007/diff/60001/mojo/data_pipe_utils/data_pipe_file_utils.cc File mojo/data_pipe_utils/data_pipe_file_utils.cc (right): https://codereview.chromium.org/1303343007/diff/60001/mojo/data_pipe_utils/data_pipe_file_utils.cc#newcode331 mojo/data_pipe_utils/data_pipe_file_utils.cc:331: base::Bind(&CopyToFileHelper, fp))) { On 2015/09/02 18:46:45, Mark Seaborn wrote: ...
5 years, 3 months ago (2015-09-02 21:49:12 UTC) #14
Mark Seaborn
LGTM https://codereview.chromium.org/1303343007/diff/80001/services/nacl/content_handler_main.cc File services/nacl/content_handler_main.cc (right): https://codereview.chromium.org/1303343007/diff/80001/services/nacl/content_handler_main.cc#newcode72 services/nacl/content_handler_main.cc:72: if (fclose(file_stream)) { On 2015/09/02 21:49:11, smklein1 wrote: ...
5 years, 3 months ago (2015-09-02 22:50:35 UTC) #15
Sean Klein
I had to modify content_handler_main_nonsfi to get it to build, since it was added by ...
5 years, 3 months ago (2015-09-02 23:25:54 UTC) #16
jamesr
Few drive-bys https://codereview.chromium.org/1303343007/diff/100001/mojo/data_pipe_utils/data_pipe_file_utils.cc File mojo/data_pipe_utils/data_pipe_file_utils.cc (right): https://codereview.chromium.org/1303343007/diff/100001/mojo/data_pipe_utils/data_pipe_file_utils.cc#newcode324 mojo/data_pipe_utils/data_pipe_file_utils.cc:324: return NULL; s/NULL/nullptr/. Only use NULL in ...
5 years, 3 months ago (2015-09-02 23:29:31 UTC) #17
Sean Klein
https://codereview.chromium.org/1303343007/diff/100001/mojo/data_pipe_utils/data_pipe_file_utils.cc File mojo/data_pipe_utils/data_pipe_file_utils.cc (right): https://codereview.chromium.org/1303343007/diff/100001/mojo/data_pipe_utils/data_pipe_file_utils.cc#newcode324 mojo/data_pipe_utils/data_pipe_file_utils.cc:324: return NULL; On 2015/09/02 23:29:31, jamesr wrote: > s/NULL/nullptr/. ...
5 years, 3 months ago (2015-09-02 23:35:35 UTC) #18
Mark Seaborn
I just noticed that this review didn't get CC'd to mojo-reviews. That is supposed to ...
5 years, 3 months ago (2015-09-03 06:33:16 UTC) #19
Sean Klein
https://codereview.chromium.org/1303343007/diff/120001/services/nacl/content_handler_main.cc File services/nacl/content_handler_main.cc (right): https://codereview.chromium.org/1303343007/diff/120001/services/nacl/content_handler_main.cc#newcode110 services/nacl/content_handler_main.cc:110: if (irt_fp_ == nullptr) { On 2015/09/03 06:33:16, Mark ...
5 years, 3 months ago (2015-09-03 15:51:50 UTC) #20
Sean Klein
Committed patchset #7 (id:140001) manually as a2b469511861b02b29a1b4c22805df467dcd420b (presubmit successful).
5 years, 3 months ago (2015-09-03 15:54:55 UTC) #21
jamesr
On 2015/09/03 at 06:33:16, mseaborn wrote: > I just noticed that this review didn't get ...
5 years, 3 months ago (2015-09-03 16:49:51 UTC) #22
Sean Klein
5 years, 3 months ago (2015-09-03 16:55:17 UTC) #23
Message was sent while issue was closed.
On 2015/09/03 16:49:51, jamesr wrote:
> On 2015/09/03 at 06:33:16, mseaborn wrote:
> > I just noticed that this review didn't get CC'd to mojo-reviews.  That is
> supposed to happen automatically.  Any idea why it didn't?
> 
> Sean - how did you upload this patch initially? 
mailto:mojo-reviews@chromium.org is
> added by the CC_LIST of the mojo repo's codereview.settings which should be
> parsed by 'git cl upload'.

I uploaded this patch the same as any of my other mojo commits. I think I might
have accidentally removed mojo-reviews from the CC list partway through
responding to the code reviews, when I was trying to prevent spamming anyone
other than the people on the reviewers list. I won't modify the default CC list
for future Cls.

Powered by Google App Engine
This is Rietveld 408576698