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

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

Issue 2814843005: media: Add incognito EME playback UMA (Closed)
Patch Set: Created 3 years, 8 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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 } 1088 }
1089 1089
1090 void WebMediaPlayerImpl::OnCdmAttached(bool success) { 1090 void WebMediaPlayerImpl::OnCdmAttached(bool success) {
1091 DVLOG(1) << __func__ << ": success = " << success; 1091 DVLOG(1) << __func__ << ": success = " << success;
1092 DCHECK(main_task_runner_->BelongsToCurrentThread()); 1092 DCHECK(main_task_runner_->BelongsToCurrentThread());
1093 DCHECK(pending_cdm_); 1093 DCHECK(pending_cdm_);
1094 1094
1095 // If the CDM is set from the constructor there is no promise 1095 // If the CDM is set from the constructor there is no promise
1096 // (|set_cdm_result_|) to fulfill. 1096 // (|set_cdm_result_|) to fulfill.
1097 if (success) { 1097 if (success) {
1098 media_log_->SetBooleanProperty("has_cdm", true);
1099
1098 // This will release the previously attached CDM (if any). 1100 // This will release the previously attached CDM (if any).
1099 cdm_ = std::move(pending_cdm_); 1101 cdm_ = std::move(pending_cdm_);
1100 if (set_cdm_result_) { 1102 if (set_cdm_result_) {
1101 set_cdm_result_->complete(); 1103 set_cdm_result_->complete();
1102 set_cdm_result_.reset(); 1104 set_cdm_result_.reset();
1103 } 1105 }
1104 1106
1105 return; 1107 return;
1106 } 1108 }
1107 1109
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 2334
2333 void WebMediaPlayerImpl::RecordUnderflowDuration(base::TimeDelta duration) { 2335 void WebMediaPlayerImpl::RecordUnderflowDuration(base::TimeDelta duration) {
2334 DCHECK(data_source_ || chunk_demuxer_); 2336 DCHECK(data_source_ || chunk_demuxer_);
2335 if (data_source_) 2337 if (data_source_)
2336 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration", duration); 2338 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration", duration);
2337 else 2339 else
2338 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration.MSE", duration); 2340 UMA_HISTOGRAM_TIMES("Media.UnderflowDuration.MSE", duration);
2339 } 2341 }
2340 2342
2341 } // namespace media 2343 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698