| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/media/media_internals.h" | 5 #include "content/browser/media/media_internals.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 ->Add(player_info.last_pipeline_status); | 417 ->Add(player_info.last_pipeline_status); |
| 418 } else if (player_info.has_audio) { | 418 } else if (player_info.has_audio) { |
| 419 UMA_HISTOGRAM_ENUMERATION("Media.PipelineStatus.AudioOnly", | 419 UMA_HISTOGRAM_ENUMERATION("Media.PipelineStatus.AudioOnly", |
| 420 player_info.last_pipeline_status, | 420 player_info.last_pipeline_status, |
| 421 media::PIPELINE_STATUS_MAX + 1); | 421 media::PIPELINE_STATUS_MAX + 1); |
| 422 } else if (player_info.has_video) { | 422 } else if (player_info.has_video) { |
| 423 UMA_HISTOGRAM_ENUMERATION("Media.PipelineStatus.VideoOnly", | 423 UMA_HISTOGRAM_ENUMERATION("Media.PipelineStatus.VideoOnly", |
| 424 player_info.last_pipeline_status, | 424 player_info.last_pipeline_status, |
| 425 media::PIPELINE_STATUS_MAX + 1); | 425 media::PIPELINE_STATUS_MAX + 1); |
| 426 } else { | 426 } else { |
| 427 // Note: This metric can be recorded as a result of normal operation with |
| 428 // Media Source Extensions. If a site creates a MediaSource object but never |
| 429 // creates a source buffer or appends data, PIPELINE_OK will be recorded. |
| 427 UMA_HISTOGRAM_ENUMERATION("Media.PipelineStatus.Unsupported", | 430 UMA_HISTOGRAM_ENUMERATION("Media.PipelineStatus.Unsupported", |
| 428 player_info.last_pipeline_status, | 431 player_info.last_pipeline_status, |
| 429 media::PIPELINE_STATUS_MAX + 1); | 432 media::PIPELINE_STATUS_MAX + 1); |
| 430 } | 433 } |
| 431 // Report whether video decoder fallback happened, but only if a video decoder | 434 // Report whether video decoder fallback happened, but only if a video decoder |
| 432 // was reported. | 435 // was reported. |
| 433 if (!player_info.video_decoder.empty()) { | 436 if (!player_info.video_decoder.empty()) { |
| 434 UMA_HISTOGRAM_BOOLEAN("Media.VideoDecoderFallback", | 437 UMA_HISTOGRAM_BOOLEAN("Media.VideoDecoderFallback", |
| 435 player_info.video_decoder_changed); | 438 player_info.video_decoder_changed); |
| 436 } | 439 } |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 audio_streams_cached_data_.GetDictionary(cache_key, &existing_dict)); | 691 audio_streams_cached_data_.GetDictionary(cache_key, &existing_dict)); |
| 689 existing_dict->MergeDictionary(value); | 692 existing_dict->MergeDictionary(value); |
| 690 } | 693 } |
| 691 } | 694 } |
| 692 | 695 |
| 693 if (CanUpdate()) | 696 if (CanUpdate()) |
| 694 SendUpdate(SerializeUpdate(function, value)); | 697 SendUpdate(SerializeUpdate(function, value)); |
| 695 } | 698 } |
| 696 | 699 |
| 697 } // namespace content | 700 } // namespace content |
| OLD | NEW |