| OLD | NEW |
| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 void ReportPipelineError(blink::WebMediaPlayer::LoadType load_type, | 142 void ReportPipelineError(blink::WebMediaPlayer::LoadType load_type, |
| 143 const blink::WebSecurityOrigin& security_origin, | 143 const blink::WebSecurityOrigin& security_origin, |
| 144 PipelineStatus error) { | 144 PipelineStatus error) { |
| 145 DCHECK_NE(PIPELINE_OK, error); | 145 DCHECK_NE(PIPELINE_OK, error); |
| 146 | 146 |
| 147 // Report the origin from where the media player is created. | 147 // Report the origin from where the media player is created. |
| 148 if (!GetMediaClient()) | 148 if (!GetMediaClient()) |
| 149 return; | 149 return; |
| 150 | 150 |
| 151 GetMediaClient()->RecordRapporURL( | 151 GetMediaClient()->RecordRapporURL( |
| 152 "Media.OriginUrl." + LoadTypeToString(load_type) + "PipelineError", | 152 "Media.OriginUrl." + LoadTypeToString(load_type) + ".PipelineError", |
| 153 blink::WebStringToGURL(security_origin.toString())); | 153 blink::WebStringToGURL(security_origin.toString())); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void RecordOriginOfHLSPlayback(const GURL& origin_url) { | 156 void RecordOriginOfHLSPlayback(const GURL& origin_url) { |
| 157 if (media::GetMediaClient()) | 157 if (media::GetMediaClient()) |
| 158 GetMediaClient()->RecordRapporURL("Media.OriginUrl.HLS", origin_url); | 158 GetMediaClient()->RecordRapporURL("Media.OriginUrl.HLS", origin_url); |
| 159 } | 159 } |
| 160 | 160 |
| 161 EmeInitDataType ConvertToEmeInitDataType( | 161 EmeInitDataType ConvertToEmeInitDataType( |
| 162 blink::WebEncryptedMediaInitDataType init_data_type) { | 162 blink::WebEncryptedMediaInitDataType init_data_type) { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 } // namespace | 250 } // namespace |
| 251 | 251 |
| 252 OutputDeviceStatusCB ConvertToOutputDeviceStatusCB( | 252 OutputDeviceStatusCB ConvertToOutputDeviceStatusCB( |
| 253 blink::WebSetSinkIdCallbacks* web_callbacks) { | 253 blink::WebSetSinkIdCallbacks* web_callbacks) { |
| 254 return media::BindToCurrentLoop( | 254 return media::BindToCurrentLoop( |
| 255 base::Bind(RunSetSinkIdCallback, SetSinkIdCallback(web_callbacks))); | 255 base::Bind(RunSetSinkIdCallback, SetSinkIdCallback(web_callbacks))); |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace media | 258 } // namespace media |
| OLD | NEW |