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

Unified Diff: chrome/browser/media/android/cdm/media_drm_credential_manager.cc

Issue 1427183002: Move MediaDrmBridge provision communication to native side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplified since we have an AndroidCdmFactory per render pid and credentials manager in chrome/ Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/android/cdm/media_drm_credential_manager.cc
diff --git a/chrome/browser/media/android/cdm/media_drm_credential_manager.cc b/chrome/browser/media/android/cdm/media_drm_credential_manager.cc
index 26cbeca45035972ecee2839194a45eef8c5042f2..969f31274439097ab100436f6bb9aeb703d4bca9 100644
--- a/chrome/browser/media/android/cdm/media_drm_credential_manager.cc
+++ b/chrome/browser/media/android/cdm/media_drm_credential_manager.cc
@@ -11,8 +11,12 @@
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_manager.h"
+#include "content/public/browser/android/cdm_provision_fetcher.h"
#include "jni/MediaDrmCredentialManager_jni.h"
#include "media/base/android/media_drm_bridge.h"
+#include "media/base/android/provision_fetcher.h"
#include "url/gurl.h"
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
@@ -89,8 +93,16 @@ void MediaDrmCredentialManager::OnResetCredentialsCompleted(
// TODO(ddorwin): The key system should be passed in. http://crbug.com/459400
bool MediaDrmCredentialManager::ResetCredentialsInternal(
SecurityLevel security_level) {
- media_drm_bridge_ =
- media::MediaDrmBridge::CreateWithoutSessionSupport(kWidevineKeySystem);
+ // Create media::ProvisionFetcher based on the last used profile.
+ Profile* profile = ProfileManager::GetLastUsedProfile();
+ net::URLRequestContextGetter* context = profile->GetRequestContext();
+
+ // new content::URLProfisionFetcher(context);
+ scoped_ptr<media::ProvisionFetcher> provision_fetcher =
+ content::CDMProvisionFetcher::CreateWithURLContext(context);
+
+ media_drm_bridge_ = media::MediaDrmBridge::CreateWithoutSessionSupport(
+ kWidevineKeySystem, provision_fetcher.Pass());
if (!media_drm_bridge_)
return false;
« no previous file with comments | « no previous file | content/browser/media/android/url_provision_fetcher.h » ('j') | content/browser/media/cdm/browser_cdm_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698