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

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 1726193002: EME: Remove all references to `needkey` except the UMA name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 EmeInitDataType init_data_type, 828 EmeInitDataType init_data_type,
829 const std::vector<uint8_t>& init_data) { 829 const std::vector<uint8_t>& init_data) {
830 DCHECK(init_data_type != EmeInitDataType::UNKNOWN); 830 DCHECK(init_data_type != EmeInitDataType::UNKNOWN);
831 831
832 // Do not fire the "encrypted" event if Encrypted Media is not enabled. 832 // Do not fire the "encrypted" event if Encrypted Media is not enabled.
833 // EME may not be enabled on Android Jelly Bean. 833 // EME may not be enabled on Android Jelly Bean.
834 if (!blink::WebRuntimeFeatures::isEncryptedMediaEnabled()) { 834 if (!blink::WebRuntimeFeatures::isEncryptedMediaEnabled()) {
835 return; 835 return;
836 } 836 }
837 837
838 // TODO(xhwang): Update this UMA name. 838 // TODO(xhwang): Update this UMA name. https://crbug.com/589251
839 UMA_HISTOGRAM_COUNTS("Media.EME.NeedKey", 1); 839 UMA_HISTOGRAM_COUNTS("Media.EME.NeedKey", 1);
840 840
841 encrypted_client_->encrypted( 841 encrypted_client_->encrypted(
842 ConvertToWebInitDataType(init_data_type), init_data.data(), 842 ConvertToWebInitDataType(init_data_type), init_data.data(),
843 base::saturated_cast<unsigned int>(init_data.size())); 843 base::saturated_cast<unsigned int>(init_data.size()));
844 } 844 }
845 845
846 void WebMediaPlayerImpl::OnWaitingForDecryptionKey() { 846 void WebMediaPlayerImpl::OnWaitingForDecryptionKey() {
847 encrypted_client_->didBlockPlaybackWaitingForKey(); 847 encrypted_client_->didBlockPlaybackWaitingForKey();
848 848
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 << ", Video: " << stats.video_memory_usage << ", DataSource: " 1580 << ", Video: " << stats.video_memory_usage << ", DataSource: "
1581 << (data_source_ ? data_source_->GetMemoryUsage() : 0) 1581 << (data_source_ ? data_source_->GetMemoryUsage() : 0)
1582 << ", Demuxer: " << demuxer_memory_usage; 1582 << ", Demuxer: " << demuxer_memory_usage;
1583 1583
1584 const int64_t delta = current_memory_usage - last_reported_memory_usage_; 1584 const int64_t delta = current_memory_usage - last_reported_memory_usage_;
1585 last_reported_memory_usage_ = current_memory_usage; 1585 last_reported_memory_usage_ = current_memory_usage;
1586 adjust_allocated_memory_cb_.Run(delta); 1586 adjust_allocated_memory_cb_.Run(delta);
1587 } 1587 }
1588 1588
1589 } // namespace media 1589 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698