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

Unified Diff: content/browser/web_contents/web_contents_android.cc

Issue 2603823002: Prohibit web payments on sites with bad SSL certificates (Closed)
Patch Set: Created 3 years, 11 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: content/browser/web_contents/web_contents_android.cc
diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc
index 422c0cb334bb6b63148c9121f26558a4c336d3eb..1f42163d88d4802fc59845cca3766eff1c11e9f8 100644
--- a/content/browser/web_contents/web_contents_android.cc
+++ b/content/browser/web_contents/web_contents_android.cc
@@ -196,14 +196,14 @@ WebContents* WebContents::FromJavaWebContents(
const JavaRef<jobject>& jweb_contents_android) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (jweb_contents_android.is_null())
- return NULL;
+ return nullptr;
WebContentsAndroid* web_contents_android =
reinterpret_cast<WebContentsAndroid*>(
Java_WebContentsImpl_getNativePointer(AttachCurrentThread(),
jweb_contents_android));
if (!web_contents_android)
- return NULL;
+ return nullptr;
return web_contents_android->web_contents();
}
@@ -336,7 +336,7 @@ void WebContentsAndroid::Unselect(JNIEnv* env,
RenderWidgetHostViewAndroid*
WebContentsAndroid::GetRenderWidgetHostViewAndroid() {
- RenderWidgetHostView* rwhv = NULL;
+ RenderWidgetHostView* rwhv = nullptr;
rwhv = web_contents_->GetRenderWidgetHostView();
if (web_contents_->ShowingInterstitialPage()) {
rwhv = web_contents_->GetInterstitialPage()
@@ -690,6 +690,13 @@ void WebContentsAndroid::DismissTextHandles(
view->DismissTextHandles();
}
+bool WebContentsAndroid::IsContextSecure(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj) {
+ WebContents* web_contents = WebContents::FromJavaWebContents(obj);
+ return web_contents != nullptr && web_contents->IsContextSecure();
+}
+
void WebContentsAndroid::OnFinishGetContentBitmap(
const JavaRef<jobject>& obj,
const JavaRef<jobject>& callback,

Powered by Google App Engine
This is Rietveld 408576698