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

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

Issue 1924743008: media: Report RAPPOR for media pipeline errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_util.h" 5 #include "media/blink/webmediaplayer_util.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 GetMediaClient()->RecordRapporURL("Media.OriginUrl.MSE.Secure", 132 GetMediaClient()->RecordRapporURL("Media.OriginUrl.MSE.Secure",
133 security_origin_url); 133 security_origin_url);
134 } else { 134 } else {
135 GetMediaClient()->RecordRapporURL("Media.OriginUrl.MSE.Insecure", 135 GetMediaClient()->RecordRapporURL("Media.OriginUrl.MSE.Insecure",
136 security_origin_url); 136 security_origin_url);
137 } 137 }
138 } 138 }
139 } 139 }
140 } 140 }
141 141
142 void ReportPipelineError(blink::WebMediaPlayer::LoadType load_type,
143 const blink::WebSecurityOrigin& security_origin,
144 PipelineStatus error) {
145 DCHECK_NE(PIPELINE_OK, error);
146
147 // Report the origin from where the media player is created.
148 if (!GetMediaClient())
149 return;
150
151 GetMediaClient()->RecordRapporURL(
152 "Media.OriginUrl." + LoadTypeToString(load_type) + "PipelineError",
153 blink::WebStringToGURL(security_origin.toString()));
xhwang 2016/04/29 00:04:17 I guess we are more interested in who's failing th
xhwang 2016/04/29 00:13:14 Just FWIW, the top errors are PIPELINE_ERROR_ABOR
154 }
155
142 void RecordOriginOfHLSPlayback(const GURL& origin_url) { 156 void RecordOriginOfHLSPlayback(const GURL& origin_url) {
143 if (media::GetMediaClient()) 157 if (media::GetMediaClient())
144 GetMediaClient()->RecordRapporURL("Media.OriginUrl.HLS", origin_url); 158 GetMediaClient()->RecordRapporURL("Media.OriginUrl.HLS", origin_url);
145 } 159 }
146 160
147 EmeInitDataType ConvertToEmeInitDataType( 161 EmeInitDataType ConvertToEmeInitDataType(
148 blink::WebEncryptedMediaInitDataType init_data_type) { 162 blink::WebEncryptedMediaInitDataType init_data_type) {
149 switch (init_data_type) { 163 switch (init_data_type) {
150 case blink::WebEncryptedMediaInitDataType::Webm: 164 case blink::WebEncryptedMediaInitDataType::Webm:
151 return EmeInitDataType::WEBM; 165 return EmeInitDataType::WEBM;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 249
236 } // namespace 250 } // namespace
237 251
238 OutputDeviceStatusCB ConvertToOutputDeviceStatusCB( 252 OutputDeviceStatusCB ConvertToOutputDeviceStatusCB(
239 blink::WebSetSinkIdCallbacks* web_callbacks) { 253 blink::WebSetSinkIdCallbacks* web_callbacks) {
240 return media::BindToCurrentLoop( 254 return media::BindToCurrentLoop(
241 base::Bind(RunSetSinkIdCallback, SetSinkIdCallback(web_callbacks))); 255 base::Bind(RunSetSinkIdCallback, SetSinkIdCallback(web_callbacks)));
242 } 256 }
243 257
244 } // namespace media 258 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698