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

Unified Diff: chrome/browser/media/media_stream_devices_controller.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_devices_controller.cc
diff --git a/chrome/browser/media/media_stream_devices_controller.cc b/chrome/browser/media/media_stream_devices_controller.cc
index 515cc99db9c834e183d960b65bcd4164c1c03d6f..47e68a1fdd3a6e7d31af0ca1e01cc94b3b23e587 100644
--- a/chrome/browser/media/media_stream_devices_controller.cc
+++ b/chrome/browser/media/media_stream_devices_controller.cc
@@ -30,6 +30,7 @@
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/scoped_user_pref_update.h"
+#include "components/url_formatter/elide_url.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/permission_type.h"
#include "content/public/browser/render_frame_host.h"
@@ -232,10 +233,6 @@ bool MediaStreamDevicesController::IsAskingForVideo() const {
return old_video_setting_ == CONTENT_SETTING_ASK;
}
-const std::string& MediaStreamDevicesController::GetSecurityOriginSpec() const {
- return request_.security_origin.spec();
-}
-
void MediaStreamDevicesController::ForcePermissionDeniedTemporarily() {
base::AutoReset<bool> persist_permissions(
&persist_permission_changes_, false);
@@ -260,7 +257,9 @@ base::string16 MediaStreamDevicesController::GetMessageText() const {
else if (!IsAskingForVideo())
message_id = IDS_MEDIA_CAPTURE_AUDIO_ONLY;
return l10n_util::GetStringFUTF16(
- message_id, base::UTF8ToUTF16(GetSecurityOriginSpec()));
+ message_id,
+ url_formatter::FormatUrlForSecurityDisplay(
+ GetOrigin(), url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC));
}
base::string16 MediaStreamDevicesController::GetMessageTextFragment() const {
« no previous file with comments | « chrome/browser/media/media_stream_devices_controller.h ('k') | chrome/browser/media/media_stream_infobar_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698