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

Issue 184853003: Cast: Add GetStats() extensions API. (Closed)

Created:
6 years, 9 months ago by imcheng
Modified:
6 years, 9 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, mikhal+watch_chromium.org, extensions-reviews_chromium.org, hguihot+watch_chromium.org, jasonroberts+watch_google.com, pwestin+watch_google.com, feature-media-reviews_chromium.org, chromium-apps-reviews_chromium.org, hubbe+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Cast: Add getStats() extensions API. It works similarly as getRawEvents() with the following differences: - it returns a dictionary that can be read more easily by the app. - it reads from LoggingStats. We should probably refactor it into a subscriber implementation in a later CL. - currently it doesn't reset stats. Also fixes bug 347750 on the side. Also fixes bug where we are doing std::copy to an uninitialized range. Fix is to use a back_inserter. Making minimal changes to the cast library to get this working. More changes to cast library to come in future CLs. BUG=347750, 301920, 338574, 348491 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255689

Patch Set 1 : #

Patch Set 2 : #

Total comments: 20

Patch Set 3 : addressed alpha's comments #

Patch Set 4 : Add files #

Total comments: 4

Patch Set 5 : Addressed alpha's comments #

Patch Set 6 : use back_inserter during std::copy #

Patch Set 7 : add missing include #

Total comments: 2

Patch Set 8 : Addressed kalman's comments #

Patch Set 9 : static cast to int #

Unified diffs Side-by-side diffs Delta from patch set Stats (+272 lines, -71 lines) Patch
M chrome/browser/extensions/cast_streaming_apitest.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/cast_streaming_rtp_stream.idl View 1 2 3 4 5 6 7 2 chunks +9 lines, -8 lines 0 comments Download
M chrome/renderer/extensions/cast_streaming_native_handler.h View 1 2 3 chunks +7 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/cast_streaming_native_handler.cc View 1 2 3 4 5 4 chunks +47 lines, -14 lines 0 comments Download
M chrome/renderer/media/cast_rtp_stream.h View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_rtp_stream.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_session.h View 1 2 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_session.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_session_delegate.h View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_session_delegate.cc View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/cast_streaming/basics.js View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/cast_streaming/common.js View 1 2 2 chunks +10 lines, -12 lines 0 comments Download
A + chrome/test/data/extensions/api_test/cast_streaming/stats.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/api_test/cast_streaming/stats.js View 1 2 3 2 chunks +7 lines, -7 lines 0 comments Download
M media/cast/logging/logging_impl.h View 1 chunk +2 lines, -2 lines 0 comments Download
M media/cast/logging/logging_impl.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M media/cast/logging/logging_impl_unittest.cc View 5 chunks +28 lines, -13 lines 0 comments Download
M media/cast/logging/logging_stats.h View 1 2 3 4 3 chunks +13 lines, -2 lines 0 comments Download
M media/cast/logging/logging_stats.cc View 1 2 3 4 5 6 7 8 4 chunks +88 lines, -5 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
imcheng
I will clean up the cl description a bit soon.
6 years, 9 months ago (2014-02-28 20:07:19 UTC) #1
Alpha Left Google
https://codereview.chromium.org/184853003/diff/40001/chrome/renderer/extensions/cast_streaming_native_handler.cc File chrome/renderer/extensions/cast_streaming_native_handler.cc (right): https://codereview.chromium.org/184853003/diff/40001/chrome/renderer/extensions/cast_streaming_native_handler.cc#newcode487 chrome/renderer/extensions/cast_streaming_native_handler.cc:487: if (it != get_raw_events_callbacks_.end()) { nit: Early return if ...
6 years, 9 months ago (2014-03-03 07:11:39 UTC) #2
imcheng
https://codereview.chromium.org/184853003/diff/40001/chrome/renderer/extensions/cast_streaming_native_handler.cc File chrome/renderer/extensions/cast_streaming_native_handler.cc (right): https://codereview.chromium.org/184853003/diff/40001/chrome/renderer/extensions/cast_streaming_native_handler.cc#newcode487 chrome/renderer/extensions/cast_streaming_native_handler.cc:487: if (it != get_raw_events_callbacks_.end()) { On 2014/03/03 07:11:39, Alpha ...
6 years, 9 months ago (2014-03-04 02:06:24 UTC) #3
Alpha Left Google
LGTM after stats_converter is folded into logging_stats. https://codereview.chromium.org/184853003/diff/70001/media/cast/logging/stats_converter.cc File media/cast/logging/stats_converter.cc (right): https://codereview.chromium.org/184853003/diff/70001/media/cast/logging/stats_converter.cc#newcode13 media/cast/logging/stats_converter.cc:13: scoped_ptr<base::DictionaryValue> ConvertStats( ...
6 years, 9 months ago (2014-03-04 21:13:35 UTC) #4
imcheng
Adding kalman@ for extensions code. PTAL, thanks. https://codereview.chromium.org/184853003/diff/70001/media/cast/logging/stats_converter.cc File media/cast/logging/stats_converter.cc (right): https://codereview.chromium.org/184853003/diff/70001/media/cast/logging/stats_converter.cc#newcode13 media/cast/logging/stats_converter.cc:13: scoped_ptr<base::DictionaryValue> ConvertStats( ...
6 years, 9 months ago (2014-03-05 00:20:26 UTC) #5
not at google - send to devlin
IDL lgtm https://codereview.chromium.org/184853003/diff/130001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl File chrome/common/extensions/api/cast_streaming_rtp_stream.idl (right): https://codereview.chromium.org/184853003/diff/130001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl#newcode65 chrome/common/extensions/api/cast_streaming_rtp_stream.idl:65: // a stream. this comment needs updating
6 years, 9 months ago (2014-03-05 20:27:09 UTC) #6
imcheng
https://codereview.chromium.org/184853003/diff/130001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl File chrome/common/extensions/api/cast_streaming_rtp_stream.idl (right): https://codereview.chromium.org/184853003/diff/130001/chrome/common/extensions/api/cast_streaming_rtp_stream.idl#newcode65 chrome/common/extensions/api/cast_streaming_rtp_stream.idl:65: // a stream. On 2014/03/05 20:27:10, kalman wrote: > ...
6 years, 9 months ago (2014-03-05 20:35:59 UTC) #7
imcheng
The CQ bit was checked by imcheng@chromium.org
6 years, 9 months ago (2014-03-05 20:36:09 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/imcheng@chromium.org/184853003/150001
6 years, 9 months ago (2014-03-05 20:36:40 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-05 22:08:34 UTC) #10
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=275566
6 years, 9 months ago (2014-03-05 22:08:35 UTC) #11
imcheng
The CQ bit was checked by imcheng@chromium.org
6 years, 9 months ago (2014-03-06 23:48:02 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/imcheng@chromium.org/184853003/170001
6 years, 9 months ago (2014-03-06 23:55:17 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-07 02:12:54 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel
6 years, 9 months ago (2014-03-07 02:12:54 UTC) #15
imcheng
The CQ bit was checked by imcheng@chromium.org
6 years, 9 months ago (2014-03-07 03:04:19 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/imcheng@chromium.org/184853003/170001
6 years, 9 months ago (2014-03-07 03:09:02 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-07 09:45:33 UTC) #18
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=277171
6 years, 9 months ago (2014-03-07 09:45:33 UTC) #19
imcheng
The CQ bit was checked by imcheng@chromium.org
6 years, 9 months ago (2014-03-07 09:46:50 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/imcheng@chromium.org/184853003/170001
6 years, 9 months ago (2014-03-07 09:48:48 UTC) #21
commit-bot: I haz the power
6 years, 9 months ago (2014-03-07 19:47:57 UTC) #22
Message was sent while issue was closed.
Change committed as 255689

Powered by Google App Engine
This is Rietveld 408576698