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

Issue 23500006: URLFetcher won't call delegate until file is closed. (Closed)

Created:
7 years, 3 months ago by waffles
Modified:
7 years, 3 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, Sorin Jianu
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

URLFetcher won't call delegate until file is closed. Previously, URLFetchers closed the file in parallel with calling the delegate, which causes races on whether or not the file has been closed. Implementing this change required the addition of a Close() function to the API of FileStream. BUG=265840 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=222737

Patch Set 1 #

Total comments: 4

Patch Set 2 : sorin@'s review #

Total comments: 4

Patch Set 3 : mmenke@'s review #

Patch Set 4 : Reorder two methods. #

Total comments: 9

Patch Set 5 : mmenke@'s 2nd review. #

Total comments: 2

Patch Set 6 : Cleanup. #

Total comments: 8

Patch Set 7 : mmenke's 3rd review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -2 lines) Patch
M net/base/file_stream.h View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
M net/base/file_stream.cc View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
M net/base/file_stream_context.h View 2 chunks +5 lines, -0 lines 0 comments Download
M net/base/file_stream_context.cc View 1 chunk +15 lines, -0 lines 0 comments Download
M net/base/file_stream_context_posix.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M net/base/file_stream_context_win.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M net/base/file_stream_metrics.h View 1 chunk +1 line, -0 lines 0 comments Download
M net/base/file_stream_metrics.cc View 2 chunks +8 lines, -1 line 0 comments Download
M net/base/file_stream_unittest.cc View 1 2 3 4 5 1 chunk +60 lines, -0 lines 0 comments Download
M net/url_request/url_fetcher_response_writer.h View 1 chunk +3 lines, -0 lines 0 comments Download
M net/url_request/url_fetcher_response_writer.cc View 1 2 3 4 5 6 1 chunk +12 lines, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
waffles
Hello willchan@, Please take a look at this patch that prevents a URLFetcher from finishing ...
7 years, 3 months ago (2013-09-05 17:49:01 UTC) #1
Sorin Jianu
Thanks Josh. https://codereview.chromium.org/23500006/diff/1/net/base/file_stream.h File net/base/file_stream.h (right): https://codereview.chromium.org/23500006/diff/1/net/base/file_stream.h#newcode84 net/base/file_stream.h:84: // Closes the file. If the file ...
7 years, 3 months ago (2013-09-05 19:59:12 UTC) #2
waffles
Thanks! https://codereview.chromium.org/23500006/diff/1/net/base/file_stream.h File net/base/file_stream.h (right): https://codereview.chromium.org/23500006/diff/1/net/base/file_stream.h#newcode84 net/base/file_stream.h:84: // Closes the file. If the file si ...
7 years, 3 months ago (2013-09-05 20:31:52 UTC) #3
willchan no longer on Chromium
Redirecting to mmenke
7 years, 3 months ago (2013-09-09 00:39:08 UTC) #4
mmenke
Suggested unit tests for the FileStream: Basic sync case w/ close, basic async case w/ ...
7 years, 3 months ago (2013-09-09 15:03:08 UTC) #5
waffles
Thanks, mmenke! Added 3 unit tests. Split Close() into CloseSync() and Close() because dealing with ...
7 years, 3 months ago (2013-09-09 22:50:55 UTC) #6
mmenke
Your unit tests look great to me. https://codereview.chromium.org/23500006/diff/34001/net/base/file_stream_unittest.cc File net/base/file_stream_unittest.cc (right): https://codereview.chromium.org/23500006/diff/34001/net/base/file_stream_unittest.cc#newcode101 net/base/file_stream_unittest.cc:101: FileStream stream(NULL); ...
7 years, 3 months ago (2013-09-10 18:32:52 UTC) #7
waffles
https://codereview.chromium.org/23500006/diff/34001/net/base/file_stream_unittest.cc File net/base/file_stream_unittest.cc (right): https://codereview.chromium.org/23500006/diff/34001/net/base/file_stream_unittest.cc#newcode101 net/base/file_stream_unittest.cc:101: FileStream stream(NULL); On 2013/09/10 18:32:52, mmenke wrote: > nit: ...
7 years, 3 months ago (2013-09-10 21:41:34 UTC) #8
mmenke
You forgot to upload the latest version. :) https://codereview.chromium.org/23500006/diff/34001/net/url_request/url_fetcher_response_writer.cc File net/url_request/url_fetcher_response_writer.cc (right): https://codereview.chromium.org/23500006/diff/34001/net/url_request/url_fetcher_response_writer.cc#newcode143 net/url_request/url_fetcher_response_writer.cc:143: base::Bind(base::IgnoreResult(&base::DeleteFile), ...
7 years, 3 months ago (2013-09-10 22:25:15 UTC) #9
waffles
On 2013/09/10 22:25:15, mmenke wrote: > You forgot to upload the latest version. :) > ...
7 years, 3 months ago (2013-09-10 22:33:02 UTC) #10
waffles
https://codereview.chromium.org/23500006/diff/34001/net/url_request/url_fetcher_response_writer.cc File net/url_request/url_fetcher_response_writer.cc (right): https://codereview.chromium.org/23500006/diff/34001/net/url_request/url_fetcher_response_writer.cc#newcode143 net/url_request/url_fetcher_response_writer.cc:143: base::Bind(base::IgnoreResult(&base::DeleteFile), On 2013/09/10 22:25:16, mmenke wrote: > On 2013/09/10 ...
7 years, 3 months ago (2013-09-10 22:33:22 UTC) #11
mmenke
Want to give it a final once over tomorrow morning, but I expect to sign ...
7 years, 3 months ago (2013-09-10 22:38:19 UTC) #12
waffles
https://codereview.chromium.org/23500006/diff/49001/net/base/file_stream_unittest.cc File net/base/file_stream_unittest.cc (right): https://codereview.chromium.org/23500006/diff/49001/net/base/file_stream_unittest.cc#newcode115 net/base/file_stream_unittest.cc:115: stream.reset(); On 2013/09/10 22:38:19, mmenke wrote: > Shouldn't this ...
7 years, 3 months ago (2013-09-10 22:58:33 UTC) #13
mmenke
LGTM, minor comments. https://codereview.chromium.org/23500006/diff/56001/net/base/file_stream.cc File net/base/file_stream.cc (right): https://codereview.chromium.org/23500006/diff/56001/net/base/file_stream.cc#newcode109 net/base/file_stream.cc:109: nit: Remove extra line break. https://codereview.chromium.org/23500006/diff/56001/net/base/file_stream.h ...
7 years, 3 months ago (2013-09-11 15:16:11 UTC) #14
waffles
Thanks! https://codereview.chromium.org/23500006/diff/56001/net/base/file_stream.cc File net/base/file_stream.cc (right): https://codereview.chromium.org/23500006/diff/56001/net/base/file_stream.cc#newcode109 net/base/file_stream.cc:109: On 2013/09/11 15:16:11, mmenke wrote: > nit: Remove ...
7 years, 3 months ago (2013-09-11 19:54:48 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/waffles@chromium.org/23500006/36001
7 years, 3 months ago (2013-09-11 23:15:14 UTC) #16
commit-bot: I haz the power
7 years, 3 months ago (2013-09-12 06:37:21 UTC) #17
Message was sent while issue was closed.
Change committed as 222737

Powered by Google App Engine
This is Rietveld 408576698