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

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: rebase only 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 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 } 944 }
945 945
946 void WebMediaPlayerImpl::OnPipelineError(PipelineStatus error) { 946 void WebMediaPlayerImpl::OnPipelineError(PipelineStatus error) {
947 DVLOG(1) << __FUNCTION__; 947 DVLOG(1) << __FUNCTION__;
948 DCHECK(main_task_runner_->BelongsToCurrentThread()); 948 DCHECK(main_task_runner_->BelongsToCurrentThread());
949 DCHECK_NE(error, PIPELINE_OK); 949 DCHECK_NE(error, PIPELINE_OK);
950 950
951 if (suppress_destruction_errors_) 951 if (suppress_destruction_errors_)
952 return; 952 return;
953 953
954 ReportPipelineError(load_type_, frame_->getSecurityOrigin(), error);
955
954 media_log_->AddEvent(media_log_->CreatePipelineErrorEvent(error)); 956 media_log_->AddEvent(media_log_->CreatePipelineErrorEvent(error));
955 957
956 if (ready_state_ == WebMediaPlayer::ReadyStateHaveNothing) { 958 if (ready_state_ == WebMediaPlayer::ReadyStateHaveNothing) {
957 // Any error that occurs before reaching ReadyStateHaveMetadata should 959 // Any error that occurs before reaching ReadyStateHaveMetadata should
958 // be considered a format error. 960 // be considered a format error.
959 SetNetworkState(WebMediaPlayer::NetworkStateFormatError); 961 SetNetworkState(WebMediaPlayer::NetworkStateFormatError);
960 } else { 962 } else {
961 SetNetworkState(PipelineErrorToNetworkState(error)); 963 SetNetworkState(PipelineErrorToNetworkState(error));
962 } 964 }
963 965
(...skipping 630 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