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

Issue 11440008: Add SHARED_DELETE flag to FileStream. (Closed)

Created:
8 years ago by pivanof
Modified:
8 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Add SHARED_DELETE flag to FileStream. Allow for all tests to do a guaranteed deletion of their temporary files (it could fail previously on Windows). TEST=net_unittests BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171257

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M net/base/file_stream_context.cc View 1 chunk +5 lines, -0 lines 1 comment Download
M net/base/file_stream_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
pivanof
8 years ago (2012-12-05 15:15:09 UTC) #1
willchan no longer on Chromium
lgtm
8 years ago (2012-12-05 16:18:39 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/paivanof@gmail.com/11440008/1
8 years ago (2012-12-05 16:19:05 UTC) #3
commit-bot: I haz the power
Change committed as 171257
8 years ago (2012-12-05 18:31:15 UTC) #4
wtc
8 years ago (2012-12-12 20:05:17 UTC) #5
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/11440008/diff/1/net/base/file_stream_c...
File net/base/file_stream_context.cc (right):

https://chromiumcodereview.appspot.com/11440008/diff/1/net/base/file_stream_c...
net/base/file_stream_context.cc:157: // adding SHARE_DELETE flag to accommodate
such use case.

I suggest clarifying this comment as follows.

1. On line 154, change
    FileStream::Context
to
    FileStream::Context::CloseAndDelete()

Does FileStream::Context::CloseAndDelete() delete the file
or delete the FileStream::Context object? I think it's the
latter, so the "CloseAndDelete" function name is a little
confusing.

2. Point out that on Windows, the FILE_SHARE_DELETE flag
allows a DeleteFile() call to succeed when there is still
an open handle to the file. This matches the Unix behavior.

Powered by Google App Engine
This is Rietveld 408576698