| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ssl/security_state_model_android.h" | 5 #include "chrome/browser/ssl/security_state_model_android.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/ssl/chrome_security_state_model_client.h" | 8 #include "chrome/browser/ssl/chrome_security_state_model_client.h" |
| 9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
| 10 #include "jni/SecurityStateModel_jni.h" | 10 #include "jni/SecurityStateModel_jni.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 const JavaParamRef<jclass>& jcaller, | 34 const JavaParamRef<jclass>& jcaller, |
| 35 const JavaParamRef<jobject>& jweb_contents) { | 35 const JavaParamRef<jobject>& jweb_contents) { |
| 36 content::WebContents* web_contents = | 36 content::WebContents* web_contents = |
| 37 content::WebContents::FromJavaWebContents(jweb_contents); | 37 content::WebContents::FromJavaWebContents(jweb_contents); |
| 38 DCHECK(web_contents); | 38 DCHECK(web_contents); |
| 39 ChromeSecurityStateModelClient::CreateForWebContents(web_contents); | 39 ChromeSecurityStateModelClient::CreateForWebContents(web_contents); |
| 40 ChromeSecurityStateModelClient* model_client = | 40 ChromeSecurityStateModelClient* model_client = |
| 41 ChromeSecurityStateModelClient::FromWebContents(web_contents); | 41 ChromeSecurityStateModelClient::FromWebContents(web_contents); |
| 42 DCHECK(model_client); | 42 DCHECK(model_client); |
| 43 return model_client->GetSecurityInfo().sha1_deprecation_status != | 43 return model_client->GetSecurityInfo().sha1_deprecation_status != |
| 44 SecurityStateModel::NO_DEPRECATED_SHA1; | 44 security_state::SecurityStateModel::NO_DEPRECATED_SHA1; |
| 45 } | 45 } |
| 46 | 46 |
| 47 // static | 47 // static |
| 48 jboolean IsPassiveMixedContentPresent( | 48 jboolean IsPassiveMixedContentPresent( |
| 49 JNIEnv* env, | 49 JNIEnv* env, |
| 50 const JavaParamRef<jclass>& jcaller, | 50 const JavaParamRef<jclass>& jcaller, |
| 51 const JavaParamRef<jobject>& jweb_contents) { | 51 const JavaParamRef<jobject>& jweb_contents) { |
| 52 content::WebContents* web_contents = | 52 content::WebContents* web_contents = |
| 53 content::WebContents::FromJavaWebContents(jweb_contents); | 53 content::WebContents::FromJavaWebContents(jweb_contents); |
| 54 DCHECK(web_contents); | 54 DCHECK(web_contents); |
| 55 ChromeSecurityStateModelClient::CreateForWebContents(web_contents); | 55 ChromeSecurityStateModelClient::CreateForWebContents(web_contents); |
| 56 ChromeSecurityStateModelClient* model_client = | 56 ChromeSecurityStateModelClient* model_client = |
| 57 ChromeSecurityStateModelClient::FromWebContents(web_contents); | 57 ChromeSecurityStateModelClient::FromWebContents(web_contents); |
| 58 DCHECK(model_client); | 58 DCHECK(model_client); |
| 59 return model_client->GetSecurityInfo().mixed_content_status == | 59 return model_client->GetSecurityInfo().mixed_content_status == |
| 60 SecurityStateModel::DISPLAYED_MIXED_CONTENT || | 60 security_state::SecurityStateModel::DISPLAYED_MIXED_CONTENT || |
| 61 model_client->GetSecurityInfo().mixed_content_status == | 61 model_client->GetSecurityInfo().mixed_content_status == |
| 62 SecurityStateModel::RAN_AND_DISPLAYED_MIXED_CONTENT; | 62 security_state::SecurityStateModel:: |
| 63 RAN_AND_DISPLAYED_MIXED_CONTENT; |
| 63 } | 64 } |
| OLD | NEW |