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

Issue 2705743002: Introduce base::ScopedPlatformHandle (Closed)

Created:
3 years, 10 months ago by Ken Rockot(use gerrit already)
Modified:
3 years, 9 months ago
Reviewers:
erikchen, dcheng
CC:
chromium-reviews, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce base::ScopedPlatformHandle ScopedPlatformHandle encapsulates ownership of one of various types of platform-specific resource handles including POSIX file descriptors, and Windows handles. The purpose of this type is to have a consistent representation of such resources for the sake of safe ownership semantics across various API boundaries, relegating platform-specific details to either the code which initially acquires the resource or the code which actually uses it. BUG=None Review-Url: https://codereview.chromium.org/2705743002 Cr-Commit-Position: refs/heads/master@{#453242} Committed: https://chromium.googlesource.com/chromium/src/+/a42cfdc27822fb57673106a4b7a953d6c8cda233

Patch Set 1 #

Total comments: 1

Patch Set 2 : union #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Total comments: 2

Patch Set 6 : . #

Patch Set 7 : . #

Total comments: 3

Patch Set 8 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -0 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
A base/files/scoped_platform_handle.h View 1 2 3 4 5 1 chunk +75 lines, -0 lines 0 comments Download
A base/files/scoped_platform_handle.cc View 1 2 3 4 5 6 7 1 chunk +31 lines, -0 lines 0 comments Download
A base/files/scoped_platform_handle_posix.cc View 1 2 3 4 5 6 7 1 chunk +25 lines, -0 lines 0 comments Download
A base/files/scoped_platform_handle_unittest.cc View 1 2 3 4 5 6 1 chunk +94 lines, -0 lines 0 comments Download
A base/files/scoped_platform_handle_win.cc View 1 2 3 4 5 6 7 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 69 (41 generated)
Ken Rockot(use gerrit already)
an attempt at doing the thing
3 years, 10 months ago (2017-02-17 23:51:44 UTC) #5
Ken Rockot(use gerrit already)
On 2017/02/17 at 23:51:44, Ken Rockot wrote: > an attempt at doing the thing (WIP ...
3 years, 10 months ago (2017-02-17 23:52:06 UTC) #6
dcheng
https://codereview.chromium.org/2705743002/diff/1/base/files/scoped_platform_handle.h File base/files/scoped_platform_handle.h (right): https://codereview.chromium.org/2705743002/diff/1/base/files/scoped_platform_handle.h#newcode148 base/files/scoped_platform_handle.h:148: // individual platform handle types. A C++11 union should ...
3 years, 10 months ago (2017-02-18 00:14:04 UTC) #9
Ken Rockot(use gerrit already)
On Fri, Feb 17, 2017 at 4:14 PM, <dcheng@chromium.org> wrote: > > https://codereview.chromium.org/2705743002/diff/1/base/ > files/scoped_platform_handle.h ...
3 years, 10 months ago (2017-02-18 00:20:46 UTC) #10
dcheng
On 2017/02/18 00:20:46, Ken Rockot wrote: > On Fri, Feb 17, 2017 at 4:14 PM, ...
3 years, 10 months ago (2017-02-18 00:22:03 UTC) #11
Ken Rockot(use gerrit already)
unionized!
3 years, 10 months ago (2017-02-18 00:32:24 UTC) #13
dcheng
https://codereview.chromium.org/2705743002/diff/80001/base/files/scoped_platform_handle.h File base/files/scoped_platform_handle.h (right): https://codereview.chromium.org/2705743002/diff/80001/base/files/scoped_platform_handle.h#newcode43 base/files/scoped_platform_handle.h:43: INVALID, How much benefit do we get from having ...
3 years, 10 months ago (2017-02-22 08:22:16 UTC) #29
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2705743002/diff/80001/base/files/scoped_platform_handle.h File base/files/scoped_platform_handle.h (right): https://codereview.chromium.org/2705743002/diff/80001/base/files/scoped_platform_handle.h#newcode43 base/files/scoped_platform_handle.h:43: INVALID, On 2017/02/22 at 08:22:16, dcheng wrote: > How ...
3 years, 10 months ago (2017-02-22 20:30:11 UTC) #30
dcheng
On 2017/02/22 20:30:11, Ken Rockot wrote: > https://codereview.chromium.org/2705743002/diff/80001/base/files/scoped_platform_handle.h > File base/files/scoped_platform_handle.h (right): > > https://codereview.chromium.org/2705743002/diff/80001/base/files/scoped_platform_handle.h#newcode43 ...
3 years, 10 months ago (2017-02-23 05:32:55 UTC) #31
Ken Rockot(use gerrit already)
On 2017/02/23 at 05:32:55, dcheng wrote: > On 2017/02/22 20:30:11, Ken Rockot wrote: > > ...
3 years, 10 months ago (2017-02-23 16:25:17 UTC) #32
dcheng
On 2017/02/23 16:25:17, Ken Rockot wrote: > On 2017/02/23 at 05:32:55, dcheng wrote: > > ...
3 years, 10 months ago (2017-02-23 20:05:26 UTC) #33
Ken Rockot(use gerrit already)
On Thu, Feb 23, 2017 at 12:05 PM, <dcheng@chromium.org> wrote: > On 2017/02/23 16:25:17, Ken ...
3 years, 10 months ago (2017-02-23 20:08:41 UTC) #34
dcheng
On 2017/02/23 20:08:41, Ken Rockot wrote: > On Thu, Feb 23, 2017 at 12:05 PM, ...
3 years, 10 months ago (2017-02-23 20:10:51 UTC) #35
Ken Rockot(use gerrit already)
OK, much simpler now, PTAL
3 years, 10 months ago (2017-02-23 21:07:00 UTC) #44
dcheng
+erikchen as FYI as well, since he did a ton of work with the ipc ...
3 years, 10 months ago (2017-02-23 21:45:37 UTC) #47
erikchen
Tracking bug? The reason I didn't do this is because it requires fixing the ownership ...
3 years, 10 months ago (2017-02-23 21:52:40 UTC) #49
Ken Rockot(use gerrit already)
On Thu, Feb 23, 2017 at 1:52 PM, <erikchen@chromium.org> wrote: > Tracking bug? The reason ...
3 years, 10 months ago (2017-02-23 21:57:43 UTC) #50
dcheng
On 2017/02/23 21:52:40, erikchen wrote: > Tracking bug? The reason I didn't do this is ...
3 years, 10 months ago (2017-02-23 21:59:17 UTC) #51
erikchen
> Can you elaborate on the complexity of ownership semantics insofar as this > might ...
3 years, 10 months ago (2017-02-23 23:22:58 UTC) #54
Ken Rockot(use gerrit already)
OK thanks for the clarification. I don't think Chrome IPC attachment ownership semantics should be ...
3 years, 10 months ago (2017-02-23 23:45:43 UTC) #55
erikchen
On 2017/02/23 23:45:43, Ken Rockot wrote: > OK thanks for the clarification. I don't think ...
3 years, 10 months ago (2017-02-24 00:09:30 UTC) #56
Ken Rockot(use gerrit already)
On Thu, Feb 23, 2017 at 4:09 PM, <erikchen@chromium.org> wrote: > On 2017/02/23 23:45:43, Ken ...
3 years, 10 months ago (2017-02-24 00:16:58 UTC) #57
erikchen
ScopedMachPort is the counterpart to ScopedFD/ScopedHandle https://cs.chromium.org/chromium/src/base/mac/scoped_mach_port.h Without a tracking bug, it's really hard to ...
3 years, 10 months ago (2017-02-24 00:21:29 UTC) #58
Ken Rockot(use gerrit already)
On 2017/02/24 at 00:21:29, erikchen wrote: > ScopedMachPort is the counterpart to ScopedFD/ScopedHandle > https://cs.chromium.org/chromium/src/base/mac/scoped_mach_port.h ...
3 years, 10 months ago (2017-02-24 19:29:21 UTC) #61
Ken Rockot(use gerrit already)
OK Daniel, I spoke with Erik offline and there is consensus that we should leave ...
3 years, 10 months ago (2017-02-24 20:08:10 UTC) #62
dcheng
lgtm (I assume there are concrete plans to use this and switch away from things ...
3 years, 10 months ago (2017-02-25 01:26:18 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2705743002/180001
3 years, 9 months ago (2017-02-27 16:19:56 UTC) #66
commit-bot: I haz the power
3 years, 9 months ago (2017-02-27 17:22:12 UTC) #69
Message was sent while issue was closed.
Committed patchset #8 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/a42cfdc27822fb57673106a4b7a9...

Powered by Google App Engine
This is Rietveld 408576698