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

Issue 604283003: Refactor CdmPromise and related classes (Closed)

Created:
6 years, 2 months ago by jrummell
Modified:
6 years, 2 months ago
CC:
chromium-reviews, eme-reviews_chromium.org, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Refactor CdmPromise and related classes Move the implementation from CdmPromiseTemplate into a new templated class CdmCallbackPromise class. CdmResultPromise can now override resolve() and reject() without having to be concerned with the callbacks. Also convert the templates into variadic templates to avoid the specialization for <void> (now just <>). BUG=358271 TEST=existing EME tests still pass Committed: https://crrev.com/60b669f6768594714aca8b72d1530ed2672c126b Cr-Commit-Position: refs/heads/master@{#298554}

Patch Set 1 #

Total comments: 65

Patch Set 2 : changes #

Patch Set 3 : Variadic Templates #

Total comments: 32

Patch Set 4 : MarkPromiseSettled #

Total comments: 2

Patch Set 5 : NewSessionCdmResultPromise #

Total comments: 4

Patch Set 6 : rebase plus nits #

Patch Set 7 : add gn file #

Patch Set 8 : Workaround for Windows #

Patch Set 9 : rebase + override #

Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -419 lines) Patch
M content/renderer/media/cdm_result_promise.h View 1 2 3 4 5 6 7 8 1 chunk +48 lines, -36 lines 0 comments Download
M content/renderer/media/cdm_result_promise.cc View 1 2 3 4 5 2 chunks +88 lines, -49 lines 0 comments Download
M content/renderer/media/crypto/ppapi_decryptor.cc View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -16 lines 0 comments Download
M content/renderer/media/crypto/proxy_decryptor.cc View 1 2 3 4 5 4 chunks +16 lines, -16 lines 0 comments Download
M content/renderer/media/webcontentdecryptionmodule_impl.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/webcontentdecryptionmodulesession_impl.cc View 1 2 3 4 3 chunks +12 lines, -34 lines 0 comments Download
M media/base/BUILD.gn View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
A media/base/cdm_callback_promise.h View 1 2 3 4 5 6 7 8 1 chunk +47 lines, -0 lines 0 comments Download
A media/base/cdm_callback_promise.cc View 1 2 3 1 chunk +43 lines, -0 lines 0 comments Download
M media/base/cdm_promise.h View 1 2 3 4 5 6 7 8 3 chunks +60 lines, -72 lines 0 comments Download
M media/base/cdm_promise.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -146 lines 0 comments Download
M media/base/media_keys.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M media/cdm/aes_decryptor_unittest.cc View 1 2 2 chunks +16 lines, -15 lines 0 comments Download
M media/cdm/ppapi/external_clear_key/clear_key_cdm.cc View 1 2 8 chunks +33 lines, -29 lines 0 comments Download
M media/filters/pipeline_integration_test.cc View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (8 generated)
jrummell
PTAL. Question: UMA is only used by CreateSession(), currently. I could simplify CdmResultPromise by moving ...
6 years, 2 months ago (2014-09-26 21:05:56 UTC) #2
ddorwin
xhwang, please review. I skimmed a few files. I think we should keep the uma ...
6 years, 2 months ago (2014-09-26 22:40:00 UTC) #3
xhwang
Thanks for cleaning this up! Here're my first round of comments. https://codereview.chromium.org/604283003/diff/1/content/renderer/media/cdm_result_promise.cc File content/renderer/media/cdm_result_promise.cc (right): ...
6 years, 2 months ago (2014-09-29 18:32:59 UTC) #4
jrummell
PS2 is the changes, PS3 is the conversion to variadic templates (removed the need for ...
6 years, 2 months ago (2014-09-29 22:08:39 UTC) #5
xhwang
Thanks, I like Variadic templates! Some trivial comments... https://codereview.chromium.org/604283003/diff/40001/content/renderer/media/cdm_result_promise.cc File content/renderer/media/cdm_result_promise.cc (right): https://codereview.chromium.org/604283003/diff/40001/content/renderer/media/cdm_result_promise.cc#newcode57 content/renderer/media/cdm_result_promise.cc:57: static ...
6 years, 2 months ago (2014-10-03 07:34:22 UTC) #6
jrummell
Updated. https://codereview.chromium.org/604283003/diff/40001/content/renderer/media/cdm_result_promise.cc File content/renderer/media/cdm_result_promise.cc (right): https://codereview.chromium.org/604283003/diff/40001/content/renderer/media/cdm_result_promise.cc#newcode57 content/renderer/media/cdm_result_promise.cc:57: static void GenerateUMA(std::string uma_name, ResultCodeForUMA result) { On ...
6 years, 2 months ago (2014-10-03 18:58:30 UTC) #7
xhwang
lgtm % comments https://codereview.chromium.org/604283003/diff/40001/content/renderer/media/webcontentdecryptionmodulesession_impl.cc File content/renderer/media/webcontentdecryptionmodulesession_impl.cc (right): https://codereview.chromium.org/604283003/diff/40001/content/renderer/media/webcontentdecryptionmodulesession_impl.cc#newcode37 content/renderer/media/webcontentdecryptionmodulesession_impl.cc:37: web_cdm_result_.completeWithSession(status); On 2014/10/03 18:58:30, jrummell wrote: ...
6 years, 2 months ago (2014-10-03 19:25:16 UTC) #8
jrummell
Updated. https://codereview.chromium.org/604283003/diff/40001/content/renderer/media/webcontentdecryptionmodulesession_impl.cc File content/renderer/media/webcontentdecryptionmodulesession_impl.cc (right): https://codereview.chromium.org/604283003/diff/40001/content/renderer/media/webcontentdecryptionmodulesession_impl.cc#newcode37 content/renderer/media/webcontentdecryptionmodulesession_impl.cc:37: web_cdm_result_.completeWithSession(status); On 2014/10/03 19:25:16, xhwang wrote: > On ...
6 years, 2 months ago (2014-10-03 21:41:05 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/604283003/80001
6 years, 2 months ago (2014-10-03 23:05:46 UTC) #11
xhwang
Looks much better, thanks! lgtm % tiny nits You can address them later :) https://codereview.chromium.org/604283003/diff/80001/content/renderer/media/cdm_result_promise.cc ...
6 years, 2 months ago (2014-10-03 23:13:57 UTC) #12
jrummell
Thanks for the reviews. https://codereview.chromium.org/604283003/diff/80001/content/renderer/media/cdm_result_promise.cc File content/renderer/media/cdm_result_promise.cc (right): https://codereview.chromium.org/604283003/diff/80001/content/renderer/media/cdm_result_promise.cc#newcode28 content/renderer/media/cdm_result_promise.cc:28: } // namespace On 2014/10/03 ...
6 years, 2 months ago (2014-10-03 23:32:07 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/604283003/100001
6 years, 2 months ago (2014-10-03 23:33:26 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/604283003/120001
6 years, 2 months ago (2014-10-04 00:19:43 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg/builds/21720)
6 years, 2 months ago (2014-10-04 01:38:21 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/604283003/160001
6 years, 2 months ago (2014-10-07 18:50:12 UTC) #23
commit-bot: I haz the power
Committed patchset #9 (id:160001) as 4d206647bec629c63c4bf387bc3e97c74dade3c4
6 years, 2 months ago (2014-10-07 20:09:42 UTC) #24
commit-bot: I haz the power
6 years, 2 months ago (2014-10-07 20:10:37 UTC) #25
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/60b669f6768594714aca8b72d1530ed2672c126b
Cr-Commit-Position: refs/heads/master@{#298554}

Powered by Google App Engine
This is Rietveld 408576698