| 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" |
| 11 | 11 |
| 12 using base::android::JavaParamRef; |
| 13 |
| 12 // static | 14 // static |
| 13 bool RegisterSecurityStateModelAndroid(JNIEnv* env) { | 15 bool RegisterSecurityStateModelAndroid(JNIEnv* env) { |
| 14 return RegisterNativesImpl(env); | 16 return RegisterNativesImpl(env); |
| 15 } | 17 } |
| 16 | 18 |
| 17 // static | 19 // static |
| 18 jint GetSecurityLevelForWebContents( | 20 jint GetSecurityLevelForWebContents( |
| 19 JNIEnv* env, | 21 JNIEnv* env, |
| 20 const JavaParamRef<jclass>& jcaller, | 22 const JavaParamRef<jclass>& jcaller, |
| 21 const JavaParamRef<jobject>& jweb_contents) { | 23 const JavaParamRef<jobject>& jweb_contents) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 ChromeSecurityStateModelClient::CreateForWebContents(web_contents); | 57 ChromeSecurityStateModelClient::CreateForWebContents(web_contents); |
| 56 ChromeSecurityStateModelClient* model_client = | 58 ChromeSecurityStateModelClient* model_client = |
| 57 ChromeSecurityStateModelClient::FromWebContents(web_contents); | 59 ChromeSecurityStateModelClient::FromWebContents(web_contents); |
| 58 DCHECK(model_client); | 60 DCHECK(model_client); |
| 59 return model_client->GetSecurityInfo().mixed_content_status == | 61 return model_client->GetSecurityInfo().mixed_content_status == |
| 60 security_state::SecurityStateModel::DISPLAYED_MIXED_CONTENT || | 62 security_state::SecurityStateModel::DISPLAYED_MIXED_CONTENT || |
| 61 model_client->GetSecurityInfo().mixed_content_status == | 63 model_client->GetSecurityInfo().mixed_content_status == |
| 62 security_state::SecurityStateModel:: | 64 security_state::SecurityStateModel:: |
| 63 RAN_AND_DISPLAYED_MIXED_CONTENT; | 65 RAN_AND_DISPLAYED_MIXED_CONTENT; |
| 64 } | 66 } |
| OLD | NEW |