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

Side by Side Diff: media/blink/webmediaplayer_impl.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
« no previous file with comments | « no previous file | media/blink/webmediaplayer_util.h » ('j') | media/blink/webmediaplayer_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 } 945 }
946 946
947 void WebMediaPlayerImpl::OnPipelineError(PipelineStatus error) { 947 void WebMediaPlayerImpl::OnPipelineError(PipelineStatus error) {
948 DVLOG(1) << __FUNCTION__; 948 DVLOG(1) << __FUNCTION__;
949 DCHECK(main_task_runner_->BelongsToCurrentThread()); 949 DCHECK(main_task_runner_->BelongsToCurrentThread());
950 DCHECK_NE(error, PIPELINE_OK); 950 DCHECK_NE(error, PIPELINE_OK);
951 951
952 if (suppress_destruction_errors_) 952 if (suppress_destruction_errors_)
953 return; 953 return;
954 954
955 ReportPipelineError(load_type_, frame_->getSecurityOrigin(), error);
956
955 media_log_->AddEvent(media_log_->CreatePipelineErrorEvent(error)); 957 media_log_->AddEvent(media_log_->CreatePipelineErrorEvent(error));
956 958
957 if (ready_state_ == WebMediaPlayer::ReadyStateHaveNothing) { 959 if (ready_state_ == WebMediaPlayer::ReadyStateHaveNothing) {
958 // Any error that occurs before reaching ReadyStateHaveMetadata should 960 // Any error that occurs before reaching ReadyStateHaveMetadata should
959 // be considered a format error. 961 // be considered a format error.
960 SetNetworkState(WebMediaPlayer::NetworkStateFormatError); 962 SetNetworkState(WebMediaPlayer::NetworkStateFormatError);
961 } else { 963 } else {
962 SetNetworkState(PipelineErrorToNetworkState(error)); 964 SetNetworkState(PipelineErrorToNetworkState(error));
963 } 965 }
964 966
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 << ", Video: " << stats.video_memory_usage << ", DataSource: " 1596 << ", Video: " << stats.video_memory_usage << ", DataSource: "
1595 << (data_source_ ? data_source_->GetMemoryUsage() : 0) 1597 << (data_source_ ? data_source_->GetMemoryUsage() : 0)
1596 << ", Demuxer: " << demuxer_memory_usage; 1598 << ", Demuxer: " << demuxer_memory_usage;
1597 1599
1598 const int64_t delta = current_memory_usage - last_reported_memory_usage_; 1600 const int64_t delta = current_memory_usage - last_reported_memory_usage_;
1599 last_reported_memory_usage_ = current_memory_usage; 1601 last_reported_memory_usage_ = current_memory_usage;
1600 adjust_allocated_memory_cb_.Run(delta); 1602 adjust_allocated_memory_cb_.Run(delta);
1601 } 1603 }
1602 1604
1603 } // namespace media 1605 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/blink/webmediaplayer_util.h » ('j') | media/blink/webmediaplayer_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698