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

Issue 1427183002: Move MediaDrmBridge provision communication to native side. (Closed)

Created:
5 years, 1 month ago by Tima Vaisburd
Modified:
5 years, 1 month ago
Reviewers:
Yaron, xhwang, qinmin
CC:
chromium-reviews, posciak+watch_chromium.org, jam, avayvod+watch_chromium.org, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, mlamouri+watch-media_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move MediaDrmBridge provision communication to native side. MediaDrmBridge currently uses Android's URLConnection and AsyncTask to communicate with provisioning server. URLConnection bypasses Chrome HTTP stack , AsyncTask requires the UI thread. This CL moves the communication to C++ side and uses a helper class ProvisionFetcher that encapsulate the provisioning. The MediaDrmBridge takes this ProvisionFetcher as a paremeter. BUG=546092 Committed: https://crrev.com/b7a0b9a3e5f55858148fdb1e36a4b0421a22467b Cr-Commit-Position: refs/heads/master@{#359923}

Patch Set 1 #

Total comments: 43

Patch Set 2 : For on-demand provisioning the fetcher is created in content/ and depends on the renderer. #

Total comments: 68

Patch Set 3 : Rebased #

Patch Set 4 : Chromecast compilation fix, added missing license #

Patch Set 5 : Rebased and lost some functionality. To be added in the next PS. #

Patch Set 6 : Simplified since we have an AndroidCdmFactory per render pid and credentials manager in chrome/ #

Total comments: 1

Patch Set 7 : Addressed more comments #

Total comments: 31

Patch Set 8 : AndroidCdmFactory use a fetcher factory instead of a fetcher; addressed more comments #

Total comments: 19

Patch Set 9 : Bound network context into callback function instead of using factory #

Total comments: 20

Patch Set 10 : Rebased, addressed comments #

Patch Set 11 : Fixed mojo compilation #

Patch Set 12 : Android Mojo client uses dummy provision fetcher instead of no fetcher at all #

Patch Set 13 : Reformatted media/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+391 lines, -128 lines) Patch
M chrome/browser/media/android/cdm/media_drm_credential_manager.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media/android/cdm/media_drm_credential_manager.cc View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -2 lines 0 comments Download
A content/browser/media/android/url_provision_fetcher.h View 1 2 3 4 5 6 7 8 1 chunk +41 lines, -0 lines 0 comments Download
A content/browser/media/android/url_provision_fetcher.cc View 1 2 3 4 5 6 7 8 9 1 chunk +77 lines, -0 lines 0 comments Download
M content/browser/media/cdm/browser_cdm_manager.cc View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -2 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
A content/public/browser/android/provision_fetcher_factory.h View 1 2 3 4 5 6 7 8 1 chunk +29 lines, -0 lines 0 comments Download
M media/base/android/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M media/base/android/android_cdm_factory.h View 1 2 3 4 5 6 7 8 9 3 chunks +7 lines, -1 line 0 comments Download
M media/base/android/android_cdm_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +7 lines, -5 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/MediaDrmBridge.java View 1 2 3 4 5 6 7 8 9 7 chunks +26 lines, -90 lines 0 comments Download
M media/base/android/media_drm_bridge.h View 1 2 3 4 5 8 6 chunks +22 lines, -1 line 0 comments Download
M media/base/android/media_drm_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 15 chunks +70 lines, -22 lines 0 comments Download
M media/base/android/media_drm_bridge_unittest.cc View 1 2 3 4 5 3 chunks +22 lines, -4 lines 0 comments Download
A media/base/android/provision_fetcher.h View 1 2 3 4 5 6 7 8 1 chunk +39 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M media/mojo/services/android_mojo_media_client.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +24 lines, -1 line 0 comments Download

Messages

Total messages: 30 (8 generated)
Tima Vaisburd
PTAL. I'm still testing this though.
5 years, 1 month ago (2015-10-30 21:09:45 UTC) #2
Tima Vaisburd
A gentle ping?
5 years, 1 month ago (2015-11-02 19:02:17 UTC) #3
qinmin
https://codereview.chromium.org/1427183002/diff/1/media/base/android/media_drm_bridge.cc File media/base/android/media_drm_bridge.cc (right): https://codereview.chromium.org/1427183002/diff/1/media/base/android/media_drm_bridge.cc#newcode813 media/base/android/media_drm_bridge.cc:813: provision_fetcher_->Retrieve( Is it ok to use the UI thread ...
5 years, 1 month ago (2015-11-02 19:39:14 UTC) #4
xhwang
We've always wanted to make this change. It's so nice to see it's happening! Here ...
5 years, 1 month ago (2015-11-02 20:37:05 UTC) #5
Tima Vaisburd
Please take another look. I split the ProvisionFetcher creation into two paths: one comes from ...
5 years, 1 month ago (2015-11-05 02:24:07 UTC) #7
Tima Vaisburd
https://chromiumcodereview.appspot.com/1427183002/diff/40001/content/browser/media/cdm/browser_cdm_manager.cc File content/browser/media/cdm/browser_cdm_manager.cc (right): https://chromiumcodereview.appspot.com/1427183002/diff/40001/content/browser/media/cdm/browser_cdm_manager.cc#newcode558 content/browser/media/cdm/browser_cdm_manager.cc:558: key_system, use_hw_secure_codecs, provision_fetcher.Pass(), On 2015/11/05 02:24:07, Tima Vaisburd wrote: ...
5 years, 1 month ago (2015-11-05 02:28:55 UTC) #8
xhwang
My comments are on PS2. Sorry about that. I'll look at your latest PS to ...
5 years, 1 month ago (2015-11-06 23:08:19 UTC) #9
Tima Vaisburd
I did the changes we discussed off-line, but there are some questions. Please take another ...
5 years, 1 month ago (2015-11-11 03:03:34 UTC) #10
xhwang
Some more comments. Note that there are some new comments in PS2. https://chromiumcodereview.appspot.com/1427183002/diff/40001/chromecast/browser/media/cast_browser_cdm_factory.h File chromecast/browser/media/cast_browser_cdm_factory.h ...
5 years, 1 month ago (2015-11-11 09:53:22 UTC) #11
xhwang
https://chromiumcodereview.appspot.com/1427183002/diff/140001/content/public/browser/android/cdm_provision_fetcher.h File content/public/browser/android/cdm_provision_fetcher.h (right): https://chromiumcodereview.appspot.com/1427183002/diff/140001/content/public/browser/android/cdm_provision_fetcher.h#newcode28 content/public/browser/android/cdm_provision_fetcher.h:28: }; Just checked again, yes you can just use ...
5 years, 1 month ago (2015-11-11 09:58:20 UTC) #12
Tima Vaisburd
Xiaohan, I tried to address all your comments except for provision request doc, but there ...
5 years, 1 month ago (2015-11-11 23:26:36 UTC) #13
xhwang
looking pretty good! Just a few more comments. The main question here is whether we ...
5 years, 1 month ago (2015-11-12 22:27:04 UTC) #14
Tima Vaisburd
Comments addressed, please take another look. https://codereview.chromium.org/1427183002/diff/40001/content/browser/media/android/url_provision_fetcher.h File content/browser/media/android/url_provision_fetcher.h (right): https://codereview.chromium.org/1427183002/diff/40001/content/browser/media/android/url_provision_fetcher.h#newcode17 content/browser/media/android/url_provision_fetcher.h:17: class URLProvisionFetcher : ...
5 years, 1 month ago (2015-11-13 03:13:10 UTC) #15
xhwang
LGTM % nits! Thanks for the patience! https://codereview.chromium.org/1427183002/diff/180001/content/browser/media/android/url_provision_fetcher.cc File content/browser/media/android/url_provision_fetcher.cc (right): https://codereview.chromium.org/1427183002/diff/180001/content/browser/media/android/url_provision_fetcher.cc#newcode73 content/browser/media/android/url_provision_fetcher.cc:73: net::URLRequestContextGetter* context_getter) ...
5 years, 1 month ago (2015-11-13 05:15:42 UTC) #16
qinmin
lgtm % nits https://codereview.chromium.org/1427183002/diff/180001/chrome/browser/media/android/cdm/media_drm_credential_manager.cc File chrome/browser/media/android/cdm/media_drm_credential_manager.cc (right): https://codereview.chromium.org/1427183002/diff/180001/chrome/browser/media/android/cdm/media_drm_credential_manager.cc#newcode96 chrome/browser/media/android/cdm/media_drm_credential_manager.cc:96: DCHECK(g_browser_process); nit: no need for this, ...
5 years, 1 month ago (2015-11-13 19:07:40 UTC) #17
Tima Vaisburd
Review: adding yfriedman@ as content/public owner. PTAL. https://codereview.chromium.org/1427183002/diff/180001/chrome/browser/media/android/cdm/media_drm_credential_manager.cc File chrome/browser/media/android/cdm/media_drm_credential_manager.cc (right): https://codereview.chromium.org/1427183002/diff/180001/chrome/browser/media/android/cdm/media_drm_credential_manager.cc#newcode96 chrome/browser/media/android/cdm/media_drm_credential_manager.cc:96: DCHECK(g_browser_process); On ...
5 years, 1 month ago (2015-11-13 21:04:44 UTC) #19
Yaron
lgtm
5 years, 1 month ago (2015-11-16 19:41:25 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1427183002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1427183002/240001
5 years, 1 month ago (2015-11-16 19:44:59 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/118982)
5 years, 1 month ago (2015-11-16 19:55:33 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1427183002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1427183002/260001
5 years, 1 month ago (2015-11-16 20:05:33 UTC) #28
commit-bot: I haz the power
Committed patchset #13 (id:260001)
5 years, 1 month ago (2015-11-16 21:36:57 UTC) #29
commit-bot: I haz the power
5 years, 1 month ago (2015-11-16 21:37:58 UTC) #30
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/b7a0b9a3e5f55858148fdb1e36a4b0421a22467b
Cr-Commit-Position: refs/heads/master@{#359923}

Powered by Google App Engine
This is Rietveld 408576698