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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 759933003: Move OnNeedKey() to WebMediaPlayerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years 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: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index 4120b36ea22b0e8dff064230919fe0addf882b85..8bb29182f4991e0847fc824d03e9ea74f716dbdd 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -1731,7 +1731,7 @@ void WebMediaPlayerAndroid::OnMediaSourceOpened(
client_->mediaSourceOpened(web_media_source);
}
-void WebMediaPlayerAndroid::OnNeedKey(const std::string& type,
+void WebMediaPlayerAndroid::OnNeedKey(const std::string& init_data_type,
const std::vector<uint8>& init_data) {
DCHECK(main_thread_checker_.CalledOnValidThread());
@@ -1743,13 +1743,14 @@ void WebMediaPlayerAndroid::OnNeedKey(const std::string& type,
UMA_HISTOGRAM_COUNTS(kMediaEme + std::string("NeedKey"), 1);
- DCHECK(init_data_type_.empty() || type.empty() || type == init_data_type_);
+ DCHECK(init_data_type_.empty() || init_data_type.empty() ||
ddorwin 2014/12/02 22:06:38 We should log instead of check here too.
xhwang 2014/12/02 22:31:27 Done.
+ init_data_type == init_data_type_);
if (init_data_type_.empty())
- init_data_type_ = type;
+ init_data_type_ = init_data_type;
const uint8* init_data_ptr = init_data.empty() ? NULL : &init_data[0];
client_->encrypted(
- WebString::fromUTF8(type), init_data_ptr, init_data.size());
+ WebString::fromUTF8(init_data_type), init_data_ptr, init_data.size());
}
void WebMediaPlayerAndroid::SetDecryptorReadyCB(

Powered by Google App Engine
This is Rietveld 408576698