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

Issue 1118103002: Implements ListenForSessionMessages in PresentationServiceImpl; uses Swap to avoid copying large da… (Closed)

Created:
5 years, 7 months ago by haibinlu
Modified:
5 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implements ListenForSessionMessages in PresentationServiceImpl; uses Swap to avoid copying large data fields. Because media router merely passes messages back and forth, it is better to move data field between mojo message struct and mr message struct. BUG= Committed: https://crrev.com/f7b39b78d4e052cd57fe9a277e578c4078c7ce5f Cr-Commit-Position: refs/heads/master@{#328417}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Added unit test #

Total comments: 17

Patch Set 3 : Addresses Anton's comments. #

Total comments: 27

Patch Set 4 : Addresses Mark's comments #

Total comments: 16

Patch Set 5 : Addresses Derek's comments #

Patch Set 6 : #

Total comments: 8

Patch Set 7 : #

Patch Set 8 : rebase #

Total comments: 1

Patch Set 9 : Avoids uniform initialization when creating std:vector #

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+319 lines, -4 lines) Patch
M content/browser/presentation/presentation_service_impl.h View 1 2 3 4 chunks +12 lines, -0 lines 0 comments Download
M content/browser/presentation/presentation_service_impl.cc View 1 2 3 4 5 6 3 chunks +61 lines, -1 line 0 comments Download
M content/browser/presentation/presentation_service_impl_unittest.cc View 1 2 3 4 5 6 7 8 5 chunks +115 lines, -0 lines 0 comments Download
M content/common/presentation/presentation_service.mojom View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M content/public/browser/presentation_service_delegate.h View 1 2 3 3 chunks +15 lines, -0 lines 0 comments Download
A content/public/browser/presentation_session_message.h View 1 2 3 4 5 6 7 8 9 1 chunk +52 lines, -0 lines 0 comments Download
A content/public/browser/presentation_session_message.cc View 1 2 3 4 1 chunk +56 lines, -0 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 37 (13 generated)
imcheng (use chromium acct)
https://codereview.chromium.org/1118103002/diff/1/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/1118103002/diff/1/content/browser/presentation/presentation_service_impl.cc#newcode348 content/browser/presentation/presentation_service_impl.cc:348: weak_factory_.GetWeakPtr(), callback)); I am not sure about binding the ...
5 years, 7 months ago (2015-04-30 21:52:01 UTC) #2
haibinlu
https://codereview.chromium.org/1118103002/diff/1/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/1118103002/diff/1/content/browser/presentation/presentation_service_impl.cc#newcode348 content/browser/presentation/presentation_service_impl.cc:348: weak_factory_.GetWeakPtr(), callback)); On 2015/04/30 21:52:01, imcheng wrote: > I ...
5 years, 7 months ago (2015-05-01 01:37:11 UTC) #4
whywhat
lgtm with nits https://codereview.chromium.org/1118103002/diff/20001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/1118103002/diff/20001/content/browser/presentation/presentation_service_impl.cc#newcode366 content/browser/presentation/presentation_service_impl.cc:366: mojoMessages[i] = nits: this needs to ...
5 years, 7 months ago (2015-05-01 15:26:12 UTC) #5
haibinlu
PTAL https://codereview.chromium.org/1118103002/diff/1/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/1118103002/diff/1/content/browser/presentation/presentation_service_impl.cc#newcode353 content/browser/presentation/presentation_service_impl.cc:353: scoped_ptr<ScopedVector<PresentationSessionMessage>> messages) { On 2015/04/30 21:52:01, imcheng wrote: ...
5 years, 7 months ago (2015-05-01 19:03:20 UTC) #6
mark a. foltz
https://codereview.chromium.org/1118103002/diff/40001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/1118103002/diff/40001/content/browser/presentation/presentation_service_impl.cc#newcode22 content/browser/presentation/presentation_service_impl.cc:22: presentation::SessionMessagePtr ToMojoSessionMessage( Add // documentation for this function. Note ...
5 years, 7 months ago (2015-05-01 19:42:08 UTC) #7
haibinlu
PTAL https://codereview.chromium.org/1118103002/diff/20001/content/browser/presentation/presentation_service_impl_unittest.cc File content/browser/presentation/presentation_service_impl_unittest.cc (right): https://codereview.chromium.org/1118103002/diff/20001/content/browser/presentation/presentation_service_impl_unittest.cc#newcode92 content/browser/presentation/presentation_service_impl_unittest.cc:92: void(int render_process_id, On 2015/05/01 15:26:12, whywhat wrote: > ...
5 years, 7 months ago (2015-05-02 00:32:56 UTC) #8
imcheng (use chromium acct)
https://codereview.chromium.org/1118103002/diff/60001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/1118103002/diff/60001/content/browser/presentation/presentation_service_impl.cc#newcode369 content/browser/presentation/presentation_service_impl.cc:369: DCHECK(!on_session_messages_callback_.get()); I think we should just CHECK here. If ...
5 years, 7 months ago (2015-05-04 19:53:56 UTC) #9
imcheng (use chromium acct)
https://codereview.chromium.org/1118103002/diff/60001/content/public/browser/presentation_session_message.cc File content/public/browser/presentation_session_message.cc (right): https://codereview.chromium.org/1118103002/diff/60001/content/public/browser/presentation_session_message.cc#newcode29 content/public/browser/presentation_session_message.cc:29: scoped_ptr<PresentationSessionMessage> Add comment: // static https://codereview.chromium.org/1118103002/diff/60001/content/public/browser/presentation_session_message.cc#newcode38 content/public/browser/presentation_session_message.cc:38: scoped_ptr<PresentationSessionMessage> ditto
5 years, 7 months ago (2015-05-04 21:21:58 UTC) #10
haibinlu
PTAL https://codereview.chromium.org/1118103002/diff/60001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/1118103002/diff/60001/content/browser/presentation/presentation_service_impl.cc#newcode369 content/browser/presentation/presentation_service_impl.cc:369: DCHECK(!on_session_messages_callback_.get()); On 2015/05/04 19:53:55, imcheng wrote: > I ...
5 years, 7 months ago (2015-05-04 21:33:50 UTC) #11
mark a. foltz
Did you upload the most recent patchset? I don't see the changes mentioned in your ...
5 years, 7 months ago (2015-05-04 22:31:12 UTC) #12
haibinlu
the latest change was uploaded.
5 years, 7 months ago (2015-05-04 22:49:32 UTC) #13
imcheng (use chromium acct)
lgtm
5 years, 7 months ago (2015-05-05 00:11:23 UTC) #14
mark a. foltz
lgtm % a few remaining comments. Can you please look at https://codereview.chromium.org/1037483003/ before landing and ...
5 years, 7 months ago (2015-05-05 00:22:13 UTC) #17
haibinlu
Yes, https://codereview.chromium.org/1037483003/ and this CL can use the same presentation_session_message. However, the current presentation_session_message of ...
5 years, 7 months ago (2015-05-05 00:42:15 UTC) #18
haibinlu
Hi, Avi, Could you take a look at files under content/public/browser/? Thanks!
5 years, 7 months ago (2015-05-05 00:46:25 UTC) #20
Avi (use Gerrit)
lgtm
5 years, 7 months ago (2015-05-05 00:58:07 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1118103002/20002
5 years, 7 months ago (2015-05-05 01:09:20 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_compile_dbg/builds/12813)
5 years, 7 months ago (2015-05-05 01:39:01 UTC) #26
whywhat
https://codereview.chromium.org/1118103002/diff/20002/content/browser/presentation/presentation_service_impl_unittest.cc File content/browser/presentation/presentation_service_impl_unittest.cc (right): https://codereview.chromium.org/1118103002/diff/20002/content/browser/presentation/presentation_service_impl_unittest.cc#newcode658 content/browser/presentation/presentation_service_impl_unittest.cc:658: std::vector<uint8_t> binary_data{'\1', '\2', '\3'}; Oops, uniform initialization is banned ...
5 years, 7 months ago (2015-05-05 10:23:47 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1118103002/150001
5 years, 7 months ago (2015-05-05 17:43:27 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/35715)
5 years, 7 months ago (2015-05-05 19:09:55 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1118103002/170001
5 years, 7 months ago (2015-05-05 19:58:55 UTC) #35
commit-bot: I haz the power
Committed patchset #10 (id:170001)
5 years, 7 months ago (2015-05-05 22:23:55 UTC) #36
commit-bot: I haz the power
5 years, 7 months ago (2015-05-05 22:24:42 UTC) #37
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/f7b39b78d4e052cd57fe9a277e578c4078c7ce5f
Cr-Commit-Position: refs/heads/master@{#328417}

Powered by Google App Engine
This is Rietveld 408576698