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

Issue 14261015: Add ScopedFile class which supports scope-out deletion and/or callbacks (Closed)

Created:
7 years, 8 months ago by kinuko
Modified:
7 years, 7 months ago
Reviewers:
michaeln, tzik
CC:
chromium-reviews, darin-cc_chromium.org
Visibility:
Public.

Description

Add ScopedFile class which supports scope-out deletion and/or callbacks and re-implement ShareableFileReference using ScopedFile. A follow-up change to change existing code to use the new ScopedFile is uploaded here: https://codereview.chromium.org/14075016/ BUG=162598 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=196611

Patch Set 1 : #

Total comments: 12

Patch Set 2 : addressed comments #

Total comments: 9

Patch Set 3 : addressed comments #

Patch Set 4 : DCHECK fix + comments fix #

Total comments: 5

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+238 lines, -67 lines) Patch
A webkit/blob/scoped_file.h View 1 2 3 1 chunk +94 lines, -0 lines 0 comments Download
A webkit/blob/scoped_file.cc View 1 2 3 4 1 chunk +83 lines, -0 lines 0 comments Download
M webkit/blob/shareable_file_reference.h View 1 2 chunks +28 lines, -30 lines 0 comments Download
M webkit/blob/shareable_file_reference.cc View 1 2 5 chunks +31 lines, -37 lines 0 comments Download
M webkit/blob/webkit_blob.gypi View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
kinuko
Revised version of https://codereview.chromium.org/14208004/ (thread-safe shareable file reference). Can you review? Thx,
7 years, 8 months ago (2013-04-22 15:52:09 UTC) #1
michaeln
some preliminary comments, this looks like a viable cut at it https://chromiumcodereview.appspot.com/14261015/diff/11001/webkit/blob/scoped_file.cc File webkit/blob/scoped_file.cc (right): ...
7 years, 8 months ago (2013-04-22 21:07:03 UTC) #2
kinuko
Thanks, updated. PTAL https://codereview.chromium.org/14261015/diff/11001/webkit/blob/scoped_file.cc File webkit/blob/scoped_file.cc (right): https://codereview.chromium.org/14261015/diff/11001/webkit/blob/scoped_file.cc#newcode62 webkit/blob/scoped_file.cc:62: iter->second->PostTask(FROM_HERE, base::Bind(iter->first, path_)); On 2013/04/22 21:07:03, ...
7 years, 8 months ago (2013-04-23 06:31:29 UTC) #3
tzik
https://codereview.chromium.org/14261015/diff/32002/webkit/blob/scoped_file.cc File webkit/blob/scoped_file.cc (right): https://codereview.chromium.org/14261015/diff/32002/webkit/blob/scoped_file.cc#newcode24 webkit/blob/scoped_file.cc:24: file_task_runner_(file_task_runner) { DCHECK(path.empty() || policy != DELETE_ON_SCOPE_OUT || !file_task_runner);? ...
7 years, 8 months ago (2013-04-24 02:37:42 UTC) #4
kinuko
Thx, updated. https://codereview.chromium.org/14261015/diff/32002/webkit/blob/scoped_file.cc File webkit/blob/scoped_file.cc (right): https://codereview.chromium.org/14261015/diff/32002/webkit/blob/scoped_file.cc#newcode24 webkit/blob/scoped_file.cc:24: file_task_runner_(file_task_runner) { On 2013/04/24 02:37:42, tzik wrote: ...
7 years, 8 months ago (2013-04-24 04:15:17 UTC) #5
kinuko
https://codereview.chromium.org/14261015/diff/32002/webkit/blob/scoped_file.cc File webkit/blob/scoped_file.cc (right): https://codereview.chromium.org/14261015/diff/32002/webkit/blob/scoped_file.cc#newcode24 webkit/blob/scoped_file.cc:24: file_task_runner_(file_task_runner) { On 2013/04/24 04:15:17, kinuko wrote: > On ...
7 years, 8 months ago (2013-04-24 04:32:18 UTC) #6
tzik
lgtm
7 years, 8 months ago (2013-04-24 04:33:06 UTC) #7
michaeln
one comment about MoveFrom to think about https://codereview.chromium.org/14261015/diff/67001/webkit/blob/scoped_file.cc File webkit/blob/scoped_file.cc (right): https://codereview.chromium.org/14261015/diff/67001/webkit/blob/scoped_file.cc#newcode67 webkit/blob/scoped_file.cc:67: } maybe ...
7 years, 8 months ago (2013-04-24 19:18:04 UTC) #8
kinuko
https://codereview.chromium.org/14261015/diff/67001/webkit/blob/scoped_file.cc File webkit/blob/scoped_file.cc (right): https://codereview.chromium.org/14261015/diff/67001/webkit/blob/scoped_file.cc#newcode67 webkit/blob/scoped_file.cc:67: } On 2013/04/24 19:18:04, michaeln wrote: > maybe clear ...
7 years, 8 months ago (2013-04-25 02:42:00 UTC) #9
michaeln
lgtm!
7 years, 7 months ago (2013-04-25 22:52:52 UTC) #10
kinuko
7 years, 7 months ago (2013-04-26 04:41:10 UTC) #11
Message was sent while issue was closed.
Committed patchset #5 manually as r196611 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698