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

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

Issue 1099453005: Switch web API/permission code to use IsOriginSecure() instead of SchemeIsSecure(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nhiroki's comment. Created 5 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.cc
diff --git a/chrome/browser/media/media_stream_infobar_delegate.cc b/chrome/browser/media/media_stream_infobar_delegate.cc
index c5940b8ee8e2ac0df5b0644856337b9ee7761771..8002e9e6b30bc0f998f606973f0a030f1adc1cfd 100644
--- a/chrome/browser/media/media_stream_infobar_delegate.cc
+++ b/chrome/browser/media/media_stream_infobar_delegate.cc
@@ -8,6 +8,7 @@
#include "base/metrics/histogram.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/infobars/infobar_service.h"
+#include "chrome/common/origin_util.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h"
#include "components/google/core/browser/google_util.h"
@@ -115,7 +116,7 @@ base::string16 MediaStreamInfoBarDelegate::GetButtonLabel(
bool MediaStreamInfoBarDelegate::Accept() {
GURL origin(controller_->GetSecurityOriginSpec());
- if (origin.SchemeIsSecure()) {
+ if (IsOriginSecure(origin)) {
UMA_HISTOGRAM_ENUMERATION("Media.DevicePermissionActions",
kAllowHttps, kPermissionActionsMax);
} else {

Powered by Google App Engine
This is Rietveld 408576698