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

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

Issue 1843063002: Don't show scheme in permission prompts if it is HTTPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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_android.cc
diff --git a/chrome/browser/media/media_stream_infobar_delegate_android.cc b/chrome/browser/media/media_stream_infobar_delegate_android.cc
index fe04c526f624d932c7fc00c99d1fb30e25c66c2b..3e77c74c780e297acc38f02ceebde2a59c8fca02 100644
--- a/chrome/browser/media/media_stream_infobar_delegate_android.cc
+++ b/chrome/browser/media/media_stream_infobar_delegate_android.cc
@@ -108,13 +108,7 @@ MediaStreamInfoBarDelegateAndroid::AsMediaStreamInfoBarDelegateAndroid() {
}
base::string16 MediaStreamInfoBarDelegateAndroid::GetMessageText() const {
- int message_id = IDS_MEDIA_CAPTURE_AUDIO_AND_VIDEO;
- if (!controller_->IsAskingForAudio())
- message_id = IDS_MEDIA_CAPTURE_VIDEO_ONLY;
- else if (!controller_->IsAskingForVideo())
- message_id = IDS_MEDIA_CAPTURE_AUDIO_ONLY;
- return l10n_util::GetStringFUTF16(
- message_id, base::UTF8ToUTF16(controller_->GetSecurityOriginSpec()));
+ return controller_->GetMessageText();
}
base::string16 MediaStreamInfoBarDelegateAndroid::GetButtonLabel(
@@ -125,8 +119,7 @@ base::string16 MediaStreamInfoBarDelegateAndroid::GetButtonLabel(
}
bool MediaStreamInfoBarDelegateAndroid::Accept() {
- GURL origin(controller_->GetSecurityOriginSpec());
- if (content::IsOriginSecure(origin)) {
+ if (content::IsOriginSecure(controller_->GetOrigin())) {
UMA_HISTOGRAM_ENUMERATION("Media.DevicePermissionActions", kAllowHttps,
kPermissionActionsMax);
} else {

Powered by Google App Engine
This is Rietveld 408576698