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

Issue 1141683002: [Presentation API] Limit the number of pending Start/JoinSession (Closed)

Created:
5 years, 7 months ago by imcheng (use chromium acct)
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

[Presentation API] Limit the number of pending Start/JoinSession requests. For StartSession, PSImpl keeps a queue of StartSession requests to be processed. (It can only process one at a time). If the queue has reached maximum allowed size (10), subsequent incoming requests will be immediately rejected. For Joinsession, PSImpl keeps a map of currently JoinSession requests that are currently processed. If the map reached maximum allowed size (10), subsequent incoming requests will be immediately rejected. Also, tried to simplify some of the cleanup flow for NewSessionMojoCallbacks by introducing a wrapper class that ensures callbacks are not dropped. Currently the cleanup logic is sprinkled all over the file so hopefully this makes things cleaner. We could generalize the callback wrapper pattern in the future if it makes necessary. BUG=412331 Committed: https://crrev.com/27e2b56b9acea83000624bea149bb7154e916d8b Cr-Commit-Position: refs/heads/master@{#330203}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed Anton's comments #

Total comments: 8

Patch Set 3 : use static counter, move generator to anonymous namespace #

Patch Set 4 : fix variable name #

Patch Set 5 : rm unused function declaration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+242 lines, -109 lines) Patch
M content/browser/presentation/presentation_service_impl.h View 1 2 3 4 9 chunks +57 lines, -33 lines 0 comments Download
M content/browser/presentation/presentation_service_impl.cc View 1 2 3 9 chunks +130 lines, -74 lines 0 comments Download
M content/browser/presentation/presentation_service_impl_unittest.cc View 3 chunks +55 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
imcheng (use chromium acct)
5 years, 7 months ago (2015-05-13 01:51:38 UTC) #2
whywhat
lgtm https://codereview.chromium.org/1141683002/diff/1/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/1141683002/diff/1/content/browser/presentation/presentation_service_impl.cc#newcode228 content/browser/presentation/presentation_service_impl.cc:228: } else { nit: consider returning after InvokeNewSessionMojoCallbackWithError ...
5 years, 7 months ago (2015-05-13 11:11:33 UTC) #3
imcheng (use chromium acct)
https://codereview.chromium.org/1141683002/diff/1/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/1141683002/diff/1/content/browser/presentation/presentation_service_impl.cc#newcode228 content/browser/presentation/presentation_service_impl.cc:228: } else { On 2015/05/13 11:11:32, whywhat wrote: > ...
5 years, 7 months ago (2015-05-13 17:07:45 UTC) #4
imcheng (use chromium acct)
Ping for mark.
5 years, 7 months ago (2015-05-14 17:44:54 UTC) #5
mark a. foltz
I don't have time before my trip to do a proper review so a few ...
5 years, 7 months ago (2015-05-14 23:03:02 UTC) #6
imcheng (use chromium acct)
https://codereview.chromium.org/1141683002/diff/20001/content/browser/presentation/presentation_service_impl.h File content/browser/presentation/presentation_service_impl.h (right): https://codereview.chromium.org/1141683002/diff/20001/content/browser/presentation/presentation_service_impl.h#newcode145 content/browser/presentation/presentation_service_impl.h:145: // before it goes out of scope. On 2015/05/14 ...
5 years, 7 months ago (2015-05-15 18:01:16 UTC) #7
imcheng (use chromium acct)
R += avi Avi, since mfoltz@ is OOO, do you mind taking a look at ...
5 years, 7 months ago (2015-05-15 18:17:14 UTC) #9
Avi (use Gerrit)
lgtm
5 years, 7 months ago (2015-05-15 18:30:55 UTC) #10
imcheng (use chromium acct)
Thanks! submitting now.
5 years, 7 months ago (2015-05-15 18:34:44 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1141683002/80001
5 years, 7 months ago (2015-05-15 20:07:43 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 7 months ago (2015-05-15 21:39:38 UTC) #15
commit-bot: I haz the power
5 years, 7 months ago (2015-05-18 11:27:48 UTC) #16
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/27e2b56b9acea83000624bea149bb7154e916d8b
Cr-Commit-Position: refs/heads/master@{#330203}

Powered by Google App Engine
This is Rietveld 408576698