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

Issue 220063005: Adds ScopedHandleBase::From (Closed)

Created:
6 years, 8 months ago by sky
Modified:
6 years, 8 months ago
CC:
chromium-reviews, Aaron Boodman, darin (slow to review), viettrungluu+watch_chromium.org, ben+mojo_chromium.org, abarth-chromium
Visibility:
Public.

Description

Adds ScopedHandleBase::From Intended for use when converting from a ScopedMessagePipeHandle to some Interface, eg: ScopedXHandle::From(scoped_message_pipe_handle.Pass()); BUG=none TEST=none R=darin@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261958

Patch Set 1 #

Patch Set 2 : comments #

Total comments: 1

Patch Set 3 : message_pipe and remove Convert #

Patch Set 4 : Go with ScopedHandleBase::From #

Patch Set 5 : add back newline #

Total comments: 3

Patch Set 6 : magic #

Total comments: 2

Patch Set 7 : wrong comment #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -0 lines) Patch
M mojo/public/cpp/system/core.h View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 2 comments Download

Messages

Total messages: 25 (0 generated)
sky
6 years, 8 months ago (2014-04-03 14:52:19 UTC) #1
vtl
https://codereview.chromium.org/220063005/diff/20001/mojo/public/cpp/bindings/interface.h File mojo/public/cpp/bindings/interface.h (right): https://codereview.chromium.org/220063005/diff/20001/mojo/public/cpp/bindings/interface.h#newcode68 mojo/public/cpp/bindings/interface.h:68: // ConvertToInterface<OmniboxPage>(message_pip_handle.Pass()), drive-by nit: message_pip -> message_pipe
6 years, 8 months ago (2014-04-03 14:58:30 UTC) #2
darin (slow to review)
How about dropping the Convert prefix? mojo::ToInterface<S>? We could also add a static From method ...
6 years, 8 months ago (2014-04-03 15:00:21 UTC) #3
vtl
On Thu, Apr 3, 2014 at 8:00 AM, Darin Fisher <darin@chromium.org> wrote: > How about ...
6 years, 8 months ago (2014-04-03 15:19:04 UTC) #4
darin (slow to review)
Why not put From on ScopedHandleBase? On Apr 3, 2014 8:19 AM, "Viet-Trung Luu" <vtl@google.com> ...
6 years, 8 months ago (2014-04-03 15:32:14 UTC) #5
sky
Woudn't that require ScopedHandleBase::From to take a ScopedMessagePipeHandle? -Scott On Thu, Apr 3, 2014 at ...
6 years, 8 months ago (2014-04-03 15:39:57 UTC) #6
sky
I updated the patch (renamed to ToInterface and fixed spelling). On Thu, Apr 3, 2014 ...
6 years, 8 months ago (2014-04-03 15:40:16 UTC) #7
vtl
I think Darin means: template <FromHandleType> static ScopedHandleBase<HandleType> From(ScopedHandleBase<FromHandleType> from) { ... } I thought ...
6 years, 8 months ago (2014-04-03 15:43:45 UTC) #8
vtl
On Thu, Apr 3, 2014 at 8:43 AM, Viet-Trung Luu <vtl@google.com> wrote: > I think ...
6 years, 8 months ago (2014-04-03 15:46:38 UTC) #9
sky
Update to ScopedHandleBase::From.
6 years, 8 months ago (2014-04-03 19:59:06 UTC) #10
viettrungluu
https://codereview.chromium.org/220063005/diff/80001/mojo/public/cpp/system/core.h File mojo/public/cpp/system/core.h (right): https://codereview.chromium.org/220063005/diff/80001/mojo/public/cpp/system/core.h#newcode52 mojo/public/cpp/system/core.h:52: template <typename Passed> Nit: Could you call this PassedHandleType? ...
6 years, 8 months ago (2014-04-03 20:42:48 UTC) #11
sky
Added some more magic to get it compiling with a cast.
6 years, 8 months ago (2014-04-03 21:10:05 UTC) #12
viettrungluu
LGTM apart from the backwards message, but Darin should probably look at it, since he ...
6 years, 8 months ago (2014-04-03 21:19:08 UTC) #13
sky
https://codereview.chromium.org/220063005/diff/100001/mojo/public/cpp/system/core.h File mojo/public/cpp/system/core.h (right): https://codereview.chromium.org/220063005/diff/100001/mojo/public/cpp/system/core.h#newcode57 mojo/public/cpp/system/core.h:57: PassedHandleType_is_not_a_subtype_of_HandleType); On 2014/04/03 21:19:08, viettrungluu wrote: > This should ...
6 years, 8 months ago (2014-04-03 21:26:44 UTC) #14
darin (slow to review)
It might be good to add a simple test. Too bad we don't have a ...
6 years, 8 months ago (2014-04-04 22:40:48 UTC) #15
darin (slow to review)
Hmm, we have base/bind_unittest.nc. That appears to be a "does not compile" test. I wonder ...
6 years, 8 months ago (2014-04-04 22:41:46 UTC) #16
darin (slow to review)
https://codereview.chromium.org/220063005/diff/120001/mojo/public/cpp/system/core.h File mojo/public/cpp/system/core.h (right): https://codereview.chromium.org/220063005/diff/120001/mojo/public/cpp/system/core.h#newcode59 mojo/public/cpp/system/core.h:59: static_cast<HandleType>(other.release().value())); On 2014/04/04 22:40:49, darin wrote: > Are you ...
6 years, 8 months ago (2014-04-04 22:56:14 UTC) #17
darin (slow to review)
OK, LGTM
6 years, 8 months ago (2014-04-04 23:00:08 UTC) #18
vtl
It doesn't. On Fri, Apr 4, 2014 at 3:41 PM, <darin@chromium.org> wrote: > Hmm, we ...
6 years, 8 months ago (2014-04-04 23:04:41 UTC) #19
vtl
crbug.com/105388 :( On Fri, Apr 4, 2014 at 4:04 PM, Viet-Trung Luu <vtl@google.com> wrote: > ...
6 years, 8 months ago (2014-04-04 23:06:42 UTC) #20
sky
The CQ bit was checked by sky@chromium.org
6 years, 8 months ago (2014-04-04 23:09:30 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/220063005/120001
6 years, 8 months ago (2014-04-04 23:09:50 UTC) #22
sky
For the record, Darin said LGTM to me in person.
6 years, 8 months ago (2014-04-04 23:09:54 UTC) #23
vtl
On 2014/04/04 23:09:54, sky wrote: > For the record, Darin said LGTM to me in ...
6 years, 8 months ago (2014-04-04 23:10:51 UTC) #24
commit-bot: I haz the power
6 years, 8 months ago (2014-04-05 02:40:34 UTC) #25
Message was sent while issue was closed.
Change committed as 261958

Powered by Google App Engine
This is Rietveld 408576698