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

Issue 2108293002: VideoCaptureManager: remove ScopedVector and other smaller cleanups (Closed)

Created:
4 years, 5 months ago by mcasas
Modified:
4 years, 5 months ago
Reviewers:
emircan, chfremer
CC:
chromium-reviews, posciak+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

VideoCaptureManager: remove ScopedVector and other smaller cleanups because is deprecated. Also using |using|. While I was doing that, I saw that some methods related to Get_X_By_Y_() had inconsistent names, signatures and/or locations in the header/implementation files, hence: - GetDeviceEntryForMediaStreamDevice() renamed to GetDeviceEntryByTypeAndId() and reducing the parameters to the used information. - GetDeviceEntryForController() renamed to GetDeviceEntryByController() - FindDeviceInfoById() renamed to GetDeviceInfoById() - GetVideoCaptureDeviceFromSessionId() renamed to GetVideoCaptureDeviceBySessionId() - Added GetDeviceEntryBySerialId(). And bundled together in the .h file. Also I shoved around some methods in the .h file to match the .cc but I'm planning on another subsequent CL just aligning both. BUG=554289 TEST=no new code introduced (this is a refactoring) so all unittests, content_browsertests and browser_tests related to video capture (there a loads of them) passing should be enough verification. Committed: https://crrev.com/8b9d517450cbf16332bc4c31aa855b40bd1ee922 Cr-Commit-Position: refs/heads/master@{#403299}

Patch Set 1 #

Total comments: 7

Patch Set 2 : chfremer@ comments #

Total comments: 16

Patch Set 3 : emircan@s nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -116 lines) Patch
M content/browser/renderer_host/media/video_capture_manager.h View 1 2 6 chunks +36 lines, -34 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 2 19 chunks +85 lines, -82 lines 0 comments Download

Messages

Total messages: 20 (11 generated)
mcasas
emircan@ PTAL
4 years, 5 months ago (2016-06-30 01:41:15 UTC) #7
chfremer
https://codereview.chromium.org/2108293002/diff/60001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2108293002/diff/60001/content/browser/renderer_host/media/video_capture_manager.cc#newcode370 content/browser/renderer_host/media/video_capture_manager.cc:370: }) != devices_.end()); Is there any reusable short-hand notation ...
4 years, 5 months ago (2016-06-30 17:08:52 UTC) #9
mcasas
PTAL https://codereview.chromium.org/2108293002/diff/60001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2108293002/diff/60001/content/browser/renderer_host/media/video_capture_manager.cc#newcode370 content/browser/renderer_host/media/video_capture_manager.cc:370: }) != devices_.end()); On 2016/06/30 17:08:52, chfremer wrote: ...
4 years, 5 months ago (2016-06-30 17:43:18 UTC) #10
chfremer
lgtm https://codereview.chromium.org/2108293002/diff/60001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2108293002/diff/60001/content/browser/renderer_host/media/video_capture_manager.cc#newcode977 content/browser/renderer_host/media/video_capture_manager.cc:977: }); Thanks for creating the bug entry. I ...
4 years, 5 months ago (2016-06-30 18:05:47 UTC) #11
emircan
lgtm % nits. https://codereview.chromium.org/2108293002/diff/80001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2108293002/diff/80001/content/browser/renderer_host/media/video_capture_manager.cc#newcode411 content/browser/renderer_host/media/video_capture_manager.cc:411: DeviceEntry* entry = GetDeviceEntryBySerialId(serial_id); DeviceEntry* const ...
4 years, 5 months ago (2016-06-30 18:24:05 UTC) #12
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/2108293002/100001
4 years, 5 months ago (2016-06-30 20:44:37 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:100001)
4 years, 5 months ago (2016-06-30 21:40:40 UTC) #17
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/8b9d517450cbf16332bc4c31aa855b40bd1ee922 Cr-Commit-Position: refs/heads/master@{#403299}
4 years, 5 months ago (2016-06-30 21:42:30 UTC) #19
mcasas
4 years, 5 months ago (2016-06-30 21:51:24 UTC) #20
Message was sent while issue was closed.
Old comments.

https://codereview.chromium.org/2108293002/diff/80001/content/browser/rendere...
File content/browser/renderer_host/media/video_capture_manager.cc (right):

https://codereview.chromium.org/2108293002/diff/80001/content/browser/rendere...
content/browser/renderer_host/media/video_capture_manager.cc:411: DeviceEntry*
entry = GetDeviceEntryBySerialId(serial_id);
On 2016/06/30 18:24:04, emircan wrote:
> DeviceEntry* const entry

Done.

https://codereview.chromium.org/2108293002/diff/80001/content/browser/rendere...
content/browser/renderer_host/media/video_capture_manager.cc:508: DeviceEntry*
entry = GetDeviceEntryBySerialId(serial_id);
On 2016/06/30 18:24:04, emircan wrote:
> Ditto

Done.

https://codereview.chromium.org/2108293002/diff/80001/content/browser/rendere...
content/browser/renderer_host/media/video_capture_manager.cc:1035: return &(it);
On 2016/06/30 18:24:04, emircan wrote:
> Remove extra ()

Done.

https://codereview.chromium.org/2108293002/diff/80001/content/browser/rendere...
File content/browser/renderer_host/media/video_capture_manager.h (right):

https://codereview.chromium.org/2108293002/diff/80001/content/browser/rendere...
content/browser/renderer_host/media/video_capture_manager.h:212: // Finds a
DeviceEntry in different ways: by its device ID and type (if it is
On 2016/06/30 18:24:05, emircan wrote:
> For consistency; s/device ID/|device_id| (also change the function parameter)
> and s/type|type|.

Done.

https://codereview.chromium.org/2108293002/diff/80001/content/browser/rendere...
content/browser/renderer_host/media/video_capture_manager.h:225: // if
necessary. Returns NULL if the session id is invalid.
On 2016/06/30 18:24:04, emircan wrote:
> s/session id/|capture_session_id|

Done.

https://codereview.chromium.org/2108293002/diff/80001/content/browser/rendere...
content/browser/renderer_host/media/video_capture_manager.h:312: SessionMap
sessions_;
On 2016/06/30 18:24:05, emircan wrote:
> Using-declarations should be in the beginning of the private section.
> https://google.github.io/styleguide/cppguide.html#Declaration_Order

Done.

https://codereview.chromium.org/2108293002/diff/80001/content/browser/rendere...
content/browser/renderer_host/media/video_capture_manager.h:314: // Currently
opened device-controller couples. The device may or may not be
On 2016/06/30 18:24:04, emircan wrote:
> It sounds like this is a vector of pairs which is misleading. Can we say
> "Currently opened DeviceEntry instances ..."?

Done.

https://codereview.chromium.org/2108293002/diff/80001/content/browser/rendere...
content/browser/renderer_host/media/video_capture_manager.h:319: using
DeviceStartQueue = std::list<CaptureDeviceStartRequest>;
On 2016/06/30 18:24:04, emircan wrote:
> Ditto.

Done.

Powered by Google App Engine
This is Rietveld 408576698