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

Unified Diff: chrome/browser/media/media_stream_infobar_delegate.cc

Issue 180633008: Add different error codes for getUserMedia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/media_stream_infobar_delegate.cc
diff --git a/chrome/browser/media/media_stream_infobar_delegate.cc b/chrome/browser/media/media_stream_infobar_delegate.cc
index 0698d09756be2278ee098168f20a80e30f9cd5e3..f3059d503e965ba2f7f900d9fb1e8ba50106ccfc 100644
--- a/chrome/browser/media/media_stream_infobar_delegate.cc
+++ b/chrome/browser/media/media_stream_infobar_delegate.cc
@@ -47,7 +47,7 @@ bool MediaStreamInfoBarDelegate::Create(
if (!infobar_service) {
// Deny the request if there is no place to show the infobar, e.g. when
// the request comes from a background extension page.
- controller->Deny(false);
+ controller->Deny(false, content::MEDIA_DEVICE_INVALID_STATE);
return false;
}
@@ -78,7 +78,7 @@ void MediaStreamInfoBarDelegate::InfoBarDismissed() {
// we don't want WebRTC to be waiting for an answer that will never come.
UMA_HISTOGRAM_ENUMERATION("Media.DevicePermissionActions",
kCancel, kPermissionActionsMax);
- controller_->Deny(false);
+ controller_->Deny(false, content::MEDIA_DEVICE_PERMISSION_DISMISSED);
}
int MediaStreamInfoBarDelegate::GetIconID() const {
@@ -127,7 +127,7 @@ bool MediaStreamInfoBarDelegate::Accept() {
bool MediaStreamInfoBarDelegate::Cancel() {
UMA_HISTOGRAM_ENUMERATION("Media.DevicePermissionActions",
kDeny, kPermissionActionsMax);
- controller_->Deny(true);
+ controller_->Deny(true, content::MEDIA_DEVICE_PERMISSION_DENIED);
return true;
}
« no previous file with comments | « chrome/browser/media/media_stream_devices_controller.cc ('k') | chrome/browser/media/webrtc_browsertest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698